Last active
November 21, 2015 22:18
-
-
Save coopermaruyama/57d3ac2d547c2c99536c to your computer and use it in GitHub Desktop.
UI Team ESLint (+ Miguel's suggestions)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"root": true, | |
"env": { | |
"es6": true, | |
"browser": true | |
}, | |
"rules": { | |
"indent": [2, "tab"], | |
"strict": [2, "global"], | |
"no-use-before-define": 0, | |
"curly": 2, | |
"complexity": 2, | |
"eqeqeq": [2, "smart"], | |
"no-lone-blocks": 2, | |
"no-magic-numbers": 2, | |
"no-multi-spaces": 2, | |
"no-multi-str": 2, | |
"no-unused-expressions": 2, | |
"no-useless-call": 2, | |
"vars-on-top": 2, | |
"wrap-iife": [2, "outside"], | |
"callback-return": 2, | |
"array-bracket-spacing": [2, "never"], | |
"block-spacing": [2, "always"], | |
"brace-style": [2, "1tbs", { | |
"allowSingleLine": true | |
}], | |
"camelcase": 2, | |
"comma-spacing": [2, { | |
"before": false, | |
"after": true | |
}], | |
"no-mixed-spaces-and-tabs": 0, | |
"comma-style": [2, "last"], | |
"computed-property-spacing": [2, "never"], | |
"consistent-this": [2, "self"], | |
"func-names": 2, | |
"func-style": [2, "declaration", { | |
"allowArrowFunctions": true | |
}], | |
"key-spacing": [2, { | |
"beforeColon": false, | |
"afterColon": true | |
}], | |
"lines-around-comment": [2, { | |
"beforeBlockComment": true, | |
"beforeLineComment": true, | |
"afterLineComment": false | |
} | |
], | |
"max-nested-callbacks": [2, 2], | |
"new-cap": 2, | |
"newline-after-var": [1, "always"], | |
"no-inline-comments": 1, | |
"no-lonely-if": 0, | |
"padded-blocks": [0, "always"], | |
"one-var": [1, "never"], | |
"operator-assignment": [1, "never"], | |
"operator-linebreak": [1, "after"], | |
"quote-props": [1, "consistent-as-needed", { | |
"keywords": true | |
}], | |
"quotes": [1, "single", "avoid-escape"], | |
"space-after-keywords": [1, "always"], | |
"space-before-blocks": 2, | |
"space-before-function-paren": [1, { | |
"anonymous": "always", | |
"named": "never" | |
}], | |
"space-in-parens": [0, "always"], | |
"space-before-keywords": [1, "always"], | |
"spaced-comment": [1, "always", { | |
"exceptions": ["-"] | |
}], | |
"object-curly-spacing": [1, "always", { | |
"objectsInObjects": false, | |
"arraysInObjects": false | |
}], | |
"max-len": [2, 80, 4] | |
}, | |
"globals": { | |
"angular": false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sweet, looks good.
Here's my feedback:
Aways use strict mode. If using ES6 modules then set it
global
, otherwisefunction
scoped.Not sure why we need spaces in inside parenthesis. Seems to go against JavaScript conventions. I’d set it to none.
Space before function paren should be none if named function. Only need a space after function keyword; according to all the popular JavaScript style guides.
Set
es6
flag totrue
if using babel otherwise it'll complain about es6 features.