diff --git a/.eslintrc b/.eslintrc index 4d116d043..1ea568659 100644 --- a/.eslintrc +++ b/.eslintrc @@ -3,23 +3,46 @@ "node": true }, "rules": { - "strict": 0, - "camelcase": 0, - "curly": 0, - "indent": [2, "tab"], - "eol-last": 2, - "no-shadow": 0, - "no-redeclare": 2, - "no-extra-bind": 2, - "no-empty": 0, - "no-process-exit": 2, - "no-underscore-dangle": 0, - "no-use-before-define": 0, - "no-unused-vars": 2, - "consistent-return": 0, - "no-inner-declarations": 2, - "no-loop-func": 2, - "no-undef": 2, - "space-before-function-paren": [2, "never"] + "indent": [2, "tab", { "SwitchCase": 1 }], + "brace-style": ["error", "1tbs"], + "no-eval": "error", + "eol-last": "error", + "no-redeclare": "error", + "no-extra-bind": "error", + "no-process-exit": "error", + "no-inner-declarations": "warn", + "no-loop-func": "warn", + "no-undef": "error", + "no-trailing-spaces": "error", + "space-before-function-paren": ["error", "never"], + "no-multi-spaces": "error", + "space-in-parens": "error", + "space-before-blocks": "error", + "no-unused-vars": "error", + "no-dupe-keys": "error", + "valid-typeof": "error", + "space-infix-ops": "error", + "no-negated-in-lhs": "error", + "no-octal": "error", + "no-regex-spaces": "error", + "no-self-assign": "error", + "no-sparse-arrays": "error", + "no-unexpected-multiline": "error", + "no-unreachable": "error", + "no-extra-semi": "error", + "no-func-assign": "error", + "no-invalid-regexp": "error", + "keyword-spacing": ["error", { + "after": false, + "overrides": { + "try": {"after": true}, + "else": {"after": true}, + "throw": {"after": true}, + "case": {"after": true}, + "return": {"after": true}, + "finally": {"after": true}, + "do": {"after": true} + } + }] } } diff --git a/package.json b/package.json index f6a657dc5..1a4ac114a 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,7 @@ "range-parser": "^1.0.3" }, "devDependencies": { - "eslint": "^2.10.1", - "beautify-lint": "^1.0.4", - "js-beautify": "^1.6.3" + "eslint": "^3.4.0" }, "licenses": [ { @@ -33,8 +31,7 @@ }, "scripts": { "lint": "eslint *.js", - "beautify-lint": "beautify-lint *.js", - "beautify": "beautify-rewrite *.js", - "travis": "npm run lint && npm run beautify-lint && node middleware.js" + "beautify": "npm run lint -- --fix", + "travis": "npm run lint && node middleware.js" } }