mirror of
https://github.com/all-contributors/cli.git
synced 2025-01-10 05:56:29 +00:00
Add eslint and xo
This commit is contained in:
parent
cd8369f681
commit
a963ee7bb1
2 changed files with 33 additions and 3 deletions
19
.eslintrc
Normal file
19
.eslintrc
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"jasmine": true,
|
||||||
|
"node": true,
|
||||||
|
"mocha": true,
|
||||||
|
"browser": true,
|
||||||
|
"builtin": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:ava/recommended"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"ava"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"no-unused-vars": [2, {"vars": "all", "args": "none"}]
|
||||||
|
}
|
||||||
|
}
|
17
package.json
17
package.json
|
@ -6,8 +6,10 @@
|
||||||
"all-contributors": "cli.js"
|
"all-contributors": "cli.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "ava \"lib/**/*.test.js\"",
|
"lint": "eslint cli.js \"lib/**/*.js\" && xo",
|
||||||
"test:w": "npm test -- --watch"
|
"test": "npm run lint && npm run test-unit",
|
||||||
|
"test-unit": "ava \"lib/**/*.test.js\"",
|
||||||
|
"test-unit:w": "npm run test-unit -- --watch"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -29,6 +31,15 @@
|
||||||
"yargs": "^4.2.0"
|
"yargs": "^4.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"ava": "^0.12.0"
|
"ava": "^0.12.0",
|
||||||
|
"eslint": "^2.3.0",
|
||||||
|
"eslint-plugin-ava": "^1.1.1",
|
||||||
|
"xo": "^0.13.0"
|
||||||
|
},
|
||||||
|
"xo": {
|
||||||
|
"space": 2,
|
||||||
|
"rules": {
|
||||||
|
"camelcase": [2, {"properties": "never"}]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue