Skip to content

Commit

Permalink
Improve eslint linting and remove js-beautify
Browse files Browse the repository at this point in the history
ESLint can do the same things as js-beautify now.
  • Loading branch information
SpaceK33z committed Sep 8, 2016
1 parent 90af0d8 commit cd47fa3
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 24 deletions.
59 changes: 41 additions & 18 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
}]
}
}
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand All @@ -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"
}
}

0 comments on commit cd47fa3

Please sign in to comment.