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": { "scripts": {
"precommit": "lint-staged", "precommit": "lint-staged",
"test": "npm run build && ava", "lint": "eslint lib/* bin/*",
"test": "npm run build && npm run lint && ava",
"prepublish": "npm run build", "prepublish": "npm run build",
"build": "./build.sh", "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" "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" "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": { "lint-staged": {
"*.js": [ "*.js": [
"npm run lint",
"prettier --single-quote --write", "prettier --single-quote --write",
"git add" "git add"
] ]
@ -82,6 +99,7 @@
"devDependencies": { "devDependencies": {
"alpha-sort": "2.0.0", "alpha-sort": "2.0.0",
"ava": "0.18.2", "ava": "0.18.2",
"eslint": "3.18.0",
"husky": "0.13.3-0", "husky": "0.13.3-0",
"lint-staged": "3.4.0", "lint-staged": "3.4.0",
"pkg": "3.0.0-beta.29" "pkg": "3.0.0-beta.29"

Loading…
Cancel
Save