Setup husky to keep track of eslint validation before commit
This commit is contained in:
parent
8cb11bc2ff
commit
4550ec3cd3
1
.husky/pre-commit
Normal file
1
.husky/pre-commit
Normal file
@ -0,0 +1 @@
|
||||
npm run lint
|
17
package-lock.json
generated
17
package-lock.json
generated
@ -63,6 +63,7 @@
|
||||
"eslint": "8.57",
|
||||
"eslint-config-prettier": "^7.2.0",
|
||||
"eslint-plugin-prettier": "^3.3.1",
|
||||
"husky": "^9.1.7",
|
||||
"kill-port": "^1.6.1",
|
||||
"mocha": "^10.4.0",
|
||||
"mri": "^1.2.0",
|
||||
@ -5126,6 +5127,22 @@
|
||||
"node": ">=18.18.0"
|
||||
}
|
||||
},
|
||||
"node_modules/husky": {
|
||||
"version": "9.1.7",
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz",
|
||||
"integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"husky": "bin.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/typicode"
|
||||
}
|
||||
},
|
||||
"node_modules/hyphenopoly": {
|
||||
"version": "5.3.0",
|
||||
"license": "MIT",
|
||||
|
@ -19,7 +19,7 @@
|
||||
"pretest": "npm run build && docker compose up -d",
|
||||
"test": "node test.cjs",
|
||||
"full-test": "WITH_WEBHINT=TRUE npm run test",
|
||||
"prepare": "npm run build && npm run install-test-deps",
|
||||
"prepare": "husky",
|
||||
"lint": "eslint src",
|
||||
"lint-report": "npm run --silent lint -- --format json > .eslint-result.json",
|
||||
"preinstrument": "npm run build --ignore-scripts && rm -fr .xunit coverage dist-instrumented",
|
||||
@ -128,6 +128,7 @@
|
||||
"eslint": "8.57",
|
||||
"eslint-config-prettier": "^7.2.0",
|
||||
"eslint-plugin-prettier": "^3.3.1",
|
||||
"husky": "^9.1.7",
|
||||
"kill-port": "^1.6.1",
|
||||
"mocha": "^10.4.0",
|
||||
"mri": "^1.2.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user