Browse Source

Use ESLint for checking for code style

master
Leo Lamprecht 8 years ago
parent
commit
468b690f9f
  1. 20
      package.json

20
package.json

@ -9,7 +9,8 @@
],
"scripts": {
"precommit": "lint-staged",
"test": "npm run build && ava",
"lint": "eslint lib/* bin/*",
"test": "npm run build && npm run lint && ava",
"prepublish": "npm run build",
"build": "./build.sh",
"pack": "pkg bin/now.js --config package.json --out-dir packed -t node7-alpine-x64,node7-linux-x64,node7-macos-x64,node7-win-x64"
@ -29,8 +30,24 @@
"test/*.js"
]
},
"eslintConfig": {
"parserOptions": {
"ecmaVersion": 8
},
"extends": "eslint:recommended",
"env": {
"node": true,
"es6": true
},
"rules": {
"no-console": 0,
"no-empty": 0,
"no-control-regex": 0
}
},
"lint-staged": {
"*.js": [
"npm run lint",
"prettier --single-quote --write",
"git add"
]
@ -82,6 +99,7 @@
"devDependencies": {
"alpha-sort": "2.0.0",
"ava": "0.18.2",
"eslint": "3.18.0",
"husky": "0.13.3-0",
"lint-staged": "3.4.0",
"pkg": "3.0.0-beta.29"

Loading…
Cancel
Save