Run eslint --fix in a pre-commit hook

cshd
Dragory 2020-08-13 00:08:04 +03:00
parent 782efd217f
commit b628ac1bfa
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
2 changed files with 899 additions and 0 deletions

888
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -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"
} }
} }