Skip to content

Commit 1f2b214

Browse files
authored
remove pre-commit hook feature (#12203)
* remove pre-commit hook feature * remove lint-staged, remake yarn lock
1 parent df28945 commit 1f2b214

File tree

5 files changed

+10
-245
lines changed

5 files changed

+10
-245
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ build/Release
3131
# Dependency directory
3232
node_modules
3333

34-
# Husky config directory
35-
.husky
36-
3734
# Optional npm cache directory
3835
.npm
3936

.husky/pre-commit

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -188,18 +188,6 @@ export default ConfirmButton;
188188

189189
We use [Prettier][] to automatically format our JavaScript code and stop all the on-going debates over styles.
190190

191-
### Pre-commit hook
192-
193-
We use [husky](https://github.com/typicode/husky) and [lint-staged](https://github.com/okonet/lint-staged) to configure and run a pre-commit hook whenever you add a commit locally using Git. This hook will automatically run `Prettier` on your code, and will also check it for `eslint` and `flow` errors. If any errors exist, you will see a message similar to:
194-
195-
`✔ Reverting to original state because of errors...`
196-
197-
which will be followed by the details of the error(s). The last line of output will say:
198-
199-
`husky > pre-commit hook failed (add --no-verify to bypass)`
200-
201-
As per this message, you can bypass this hook by adding `--no-verify` to your `git commit` command, but we do not recommend doing this. Instead, you should fix any errors reported and then run `git commit` again, and it should succeed.
202-
203191
### Code coverage
204192

205193
To see a report of code coverage, type:

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"test-once": "bin/config-check.js && better-npm-run jest && npm run lint",
4444
"version-check": "bin/version-check.js",
4545
"webpack-dev-server": "npm run build-locales && better-npm-run webpack-dev-server",
46-
"prepare": "husky install",
4746
"check-fonts": "./bin/regenerate_font.js src/fonts/woff2/Inter-roman.var.woff2 && ./bin/regenerate_font.js src/fonts/woff2/Inter-roman-subset-en_de_fr_ru_es_pt_pl_it.var.woff2 && git diff --quiet HEAD src/fonts/ || (echo '\n\n Did you manually alter font files that should be generated automatically ? See docs/fonts.md for details. This check found the following differences:\n\n' && git --no-pager diff src/fonts && exit 1)"
4847
},
4948
"betterScripts": {
@@ -291,15 +290,13 @@
291290
"glob": "^10.2.2",
292291
"html-webpack-plugin": "5.5.1",
293292
"http-proxy": "^1.16.2",
294-
"husky": "^8.0.3",
295293
"intl": "^1.2.5",
296294
"intl-locales-supported": "^1.0.0",
297295
"jest": "^29.5.0",
298296
"jest-environment-jsdom": "^29.5.0",
299297
"jest-extended": "^3.2.4",
300298
"jest-json-schema": "^6.1.0",
301299
"jest-watch-typeahead": "^2.2.2",
302-
"lint-staged": "^13.2.2",
303300
"mini-css-extract-plugin": "^2.7.6",
304301
"mock-express-request": "^0.2.0",
305302
"mock-express-response": "^0.3.0",

0 commit comments

Comments
 (0)