From 9b2c1a5c9cb682e61b48ea75f39f2eda3e3f97d5 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 17 Oct 2018 12:11:15 -0400 Subject: [PATCH 1/2] Remove husky package, which installs pesky git precommit hooks. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If I spend the time to select specific hunks to include in a LOCAL commit using `git commit -p`, it is completely unacceptable for a tool to throw that work away, e.g. husky > npm run -s precommit (node v8.9.2) � Finding changed files since git revision f084923. � Found 5 changed files. ✍️ Fixing up examples/ssr/imports/app.js. ✍️ Fixing up examples/ssr/server/main.js. ✗ Found partially staged file examples/ssr/server/main.js. ✍️ Fixing up src/Query.tsx. ✗ Found partially staged file src/Query.tsx. ✍️ Fixing up src/getDataFromTree.ts. ✗ Found partially staged file src/getDataFromTree.ts. ✗ Partially staged files were fixed up. Please update stage before committing. husky > pre-commit hook failed (add --no-verify to bypass) From this point on, I will not hesitate to remove/disable any tool that installs a destructive precommit hook in any of our repositories. Prepush hooks are fine, but only if their role is to reject the push if it fails a check. Editing commits without my explicit consent is never OK. --- package-lock.json | 25 ------------------------- package.json | 1 - 2 files changed, 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6fca58a504..df2fcefeac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4398,25 +4398,6 @@ } } }, - "husky": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", - "integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==", - "dev": true, - "requires": { - "is-ci": "^1.0.10", - "normalize-path": "^1.0.0", - "strip-indent": "^2.0.0" - }, - "dependencies": { - "normalize-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz", - "integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=", - "dev": true - } - } - }, "hyperlinker": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/hyperlinker/-/hyperlinker-1.0.0.tgz", @@ -9167,12 +9148,6 @@ "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", - "dev": true - }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", diff --git a/package.json b/package.json index 4c98e8af03..ea70870a9e 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,6 @@ "enzyme-adapter-react-16": "1.6.0", "graphql": "14.0.2", "graphql-tag": "2.10.0", - "husky": "0.14.3", "jest": "23.6.0", "jest-junit": "5.2.0", "jsdom": "12.2.0", From 0b8ba3b307d084e78df62a75e9795574c7e3208b Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 17 Oct 2018 12:25:30 -0400 Subject: [PATCH 2/2] Remove all remaining destructive precommit hooks. --- package-lock.json | 77 ----------------------------------------------- package.json | 2 -- 2 files changed, 79 deletions(-) diff --git a/package-lock.json b/package-lock.json index df2fcefeac..5937bf4b80 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4409,12 +4409,6 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true - }, "iltorb": { "version": "1.3.10", "resolved": "https://registry.npmjs.org/iltorb/-/iltorb-1.3.10.tgz", @@ -6583,12 +6577,6 @@ "integrity": "sha512-gFD2xGCl8YFgGHsqJ9NKRVdwlioeW3mI1iqfLNYQOv0+6JRwG58Zk9DIGQgyIaffSYaO1xsKnMaYzzNr1KyIAw==", "dev": true }, - "mri": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.1.tgz", - "integrity": "sha1-haom09ru7t+A3FmEr5XMXKXK2fE=", - "dev": true - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -7392,71 +7380,6 @@ } } }, - "pretty-quick": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-1.8.0.tgz", - "integrity": "sha512-qV25sQF/ivJpdZ5efwemQYkQJa7sp3HqT/Vf/7z5vGYMcq1VrT2lDpFKAxJPf6219N1YAdR8mGkIhPAZ1odTmQ==", - "dev": true, - "requires": { - "chalk": "^2.3.0", - "execa": "^0.8.0", - "find-up": "^2.1.0", - "ignore": "^3.3.7", - "mri": "^1.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "execa": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", - "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, "prettycli": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/prettycli/-/prettycli-1.4.3.tgz", diff --git a/package.json b/package.json index ea70870a9e..d50806c83d 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "lint-staged": "lint-staged", "lint:fix": "npm run prettier && tslint 'src/*.ts*' --project tsconfig.json --fix", "postcompile": "rollup -c && ./scripts/prepare-package.sh", - "precommit": "pretty-quick --staged", "precompile": "rimraf lib", "predeploy": "npm run compile", "prefilesize": "npm run compile", @@ -126,7 +125,6 @@ "preact": "8.3.1", "preact-compat": "3.18.4", "prettier": "1.14.3", - "pretty-quick": "1.8.0", "react": "16.5.2", "react-dom": "16.5.2", "react-test-renderer": "16.5.2",