diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..0d07199 --- /dev/null +++ b/.eslintrc @@ -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"}] + } +} diff --git a/package.json b/package.json index 5ac8a1c..f566dfc 100644 --- a/package.json +++ b/package.json @@ -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"}] + } } }