add lint-staged
This commit is contained in:
2
.huskyrc
2
.huskyrc
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"pre-commit": "npm run validate"
|
"pre-commit": "npm run check-types && lint-staged"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
9
.lintstagedrc
Normal file
9
.lintstagedrc
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"*.+(js|ts|tsx)": [
|
||||||
|
"eslint"
|
||||||
|
],
|
||||||
|
"*.+(js|json|ts|tsx)": [
|
||||||
|
"prettier --write",
|
||||||
|
"git add"
|
||||||
|
]
|
||||||
|
}
|
||||||
915
package-lock.json
generated
915
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -22,6 +22,7 @@
|
|||||||
"eslint": "^6.6.0",
|
"eslint": "^6.6.0",
|
||||||
"eslint-config-prettier": "^6.5.0",
|
"eslint-config-prettier": "^6.5.0",
|
||||||
"husky": "^3.0.9",
|
"husky": "^3.0.9",
|
||||||
|
"lint-staged": "^9.4.2",
|
||||||
"prettier": "^1.19.1",
|
"prettier": "^1.19.1",
|
||||||
"typescript": "^3.7.2"
|
"typescript": "^3.7.2"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user