Add eslint and xo

This commit is contained in:
Jeroen Engels 2016-03-07 00:20:10 +01:00
parent cd8369f681
commit a963ee7bb1
2 changed files with 33 additions and 3 deletions

19
.eslintrc Normal file
View 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"}]
}
}

View file

@ -6,8 +6,10 @@
"all-contributors": "cli.js"
},
"scripts": {
"test": "ava \"lib/**/*.test.js\"",
"test:w": "npm test -- --watch"
"lint": "eslint cli.js \"lib/**/*.js\" && xo",
"test": "npm run lint && npm run test-unit",
"test-unit": "ava \"lib/**/*.test.js\"",
"test-unit:w": "npm run test-unit -- --watch"
},
"repository": {
"type": "git",
@ -29,6 +31,15 @@
"yargs": "^4.2.0"
},
"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"}]
}
}
}