1
0
mirror of synced 2025-02-16 23:43:24 +01:00

Use husky and lint-staged to prevent accidental code

This commit is contained in:
Peter Hurst 2018-02-12 21:03:28 +00:00
parent ed6c73fc16
commit 4df0305ccc
3 changed files with 29 additions and 0 deletions

6
.eslintrc Normal file
View File

@ -0,0 +1,6 @@
{
"plugins": ["nocode"],
"rules": {
"nocode/nocode": 2
}
}

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
node_modules
yarn.lock

21
package.json Normal file
View 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"
}
}