Add husky and lint-staged git hooks
This commit is contained in:
12
.lintstagedrc.js
Normal file
12
.lintstagedrc.js
Normal file
@@ -0,0 +1,12 @@
|
||||
module.exports = {
|
||||
"src/**/*.js": files => [
|
||||
`eslint "${files.join('" "')}"`,
|
||||
'grunt js',
|
||||
'git add javascripts/'
|
||||
],
|
||||
"src/**/*.scss": files => [
|
||||
`stylelint "${files.join('" "')}"`,
|
||||
'grunt css',
|
||||
'git add stylesheets/ plugins/'
|
||||
],
|
||||
}
|
||||
814
package-lock.json
generated
814
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -41,6 +41,8 @@
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^4.2.1",
|
||||
"eslint-plugin-standard": "^4.0.1",
|
||||
"husky": "^4.2.5",
|
||||
"lint-staged": "^10.2.6",
|
||||
"stylelint": "^13.5.0",
|
||||
"stylelint-order": "^4.0.0",
|
||||
"stylelint-scss": "^3.17.2"
|
||||
@@ -49,5 +51,10 @@
|
||||
"last 2 versions",
|
||||
"> 1%",
|
||||
"not dead"
|
||||
]
|
||||
],
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged --relative"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user