-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Lint with eslint #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lint with eslint #172
Changes from all commits
5c141ab
6aa2f7d
006b297
9a9395f
23d3188
c01995e
6fbff97
e0f9f00
80563be
b8af7e5
1eceb03
c80026d
6f07747
767d22b
abeae11
2daa656
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_modules | ||
dist | ||
build | ||
|
||
test/jasmine/assets/jquery-1.8.3.min.js | ||
src/plots/polar/micropolar.js | ||
src/plots/geo/projections.js | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"eslint:recommended", | ||
], | ||
"env": { | ||
"commonjs": true | ||
}, | ||
"rules": { | ||
"no-trailing-spaces": [2], | ||
"no-multiple-empty-lines": [2, {"max": 3, "maxEOF": 1}], | ||
"linebreak-style": [2, "unix"], | ||
"indent": [2, 4, {"SwitchCase": 1}], | ||
"max-len": [0, 80], | ||
"brace-style": [0, "stroustrup", {"allowSingleLine": true}], | ||
"curly": [0, "multi"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. another slightly controversial rule: http://eslint.org/docs/rules/curly |
||
"camelcase": [0, {"properties": "never"}], | ||
"comma-spacing": [0, {"before": false, "after": true}], | ||
"comma-style": [2, "last"], | ||
"semi": [2], | ||
"semi-spacing": [2, {"before": false, "after": true}], | ||
"key-spacing": [0, {"beforeColon": false, "afterColon": true}], | ||
"no-spaced-func": [2], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"space-in-parens": [2, "never"], | ||
"space-before-function-paren": [2, "never"], | ||
"no-multi-spaces": [2], | ||
"space-infix-ops": [0, {"int32Hint": false}], | ||
"quotes": [2, "single"], | ||
"dot-notation": [2, {"allowKeywords": false}], | ||
"eqeqeq": [2], | ||
"new-cap": [0], | ||
"no-redeclare": [2, {"builtinGlobals": true}], | ||
"no-shadow": [0, {"builtinGlobals": true}], | ||
"block-scoped-var": [2], | ||
"no-unused-vars": [2], | ||
"no-use-before-define": [2, "nofunc"], | ||
"no-loop-func": [2], | ||
"no-console": [0] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, the rules with The rules I added with The rules I added with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sounds good |
||
}, | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "../.eslintrc", | ||
"env": { | ||
"node": true, | ||
"browser": true | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/*eslint dot-notation: 0*/ | ||
|
||
var plotButtons = require('./buttons'); | ||
|
||
var figDir = '../../test/image/baselines/'; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../.eslintrc", | ||
"env": { | ||
"browser": true | ||
}, | ||
"rules": { | ||
"strict": [2, "global"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The best part about We can lint the whole project with no config repetition. |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add
node_modules
in here too, no?I see that projections is a forked file from somewhere else, but why ignore micropolar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I think
eslint
ignores it by default. But might as well throw it there for completenessBecause, that file is brutal and is on its deathbed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for honesty 🍻