Run eslint --fix in a pre-commit hook
parent
782efd217f
commit
b628ac1bfa
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
|
@ -9,6 +9,7 @@
|
||||||
"watch": "nodemon -w src src/index.js",
|
"watch": "nodemon -w src src/index.js",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"lint": "eslint ./src",
|
"lint": "eslint ./src",
|
||||||
|
"lint-fix": "eslint --fix ./src",
|
||||||
"generate-config-jsdoc": "node src/data/generateCfgJsdoc.js"
|
"generate-config-jsdoc": "node src/data/generateCfgJsdoc.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -35,9 +36,19 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^6.7.2",
|
"eslint": "^6.7.2",
|
||||||
|
"husky": "^4.2.5",
|
||||||
|
"lint-staged": "^10.2.11",
|
||||||
"nodemon": "^2.0.1"
|
"nodemon": "^2.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0 <14.0.0"
|
"node": ">=10.0.0 <14.0.0"
|
||||||
|
},
|
||||||
|
"husky": {
|
||||||
|
"hooks": {
|
||||||
|
"pre-commit": "lint-staged"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*.js": "eslint --fix"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue