Use husky and lint-staged to prevent accidental code
This commit is contained in:
parent
ed6c73fc16
commit
4df0305ccc
6
.eslintrc
Normal file
6
.eslintrc
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"plugins": ["nocode"],
|
||||
"rules": {
|
||||
"nocode/nocode": 2
|
||||
}
|
||||
}
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
node_modules
|
||||
yarn.lock
|
21
package.json
Normal file
21
package.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "nocode",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"test": "eslint ."
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.js": [
|
||||
"eslint --fix",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^4.17.0",
|
||||
"eslint-plugin-nocode": "^0.0.4",
|
||||
"husky": "^0.14.3",
|
||||
"lint-staged": "^6.1.0"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user