Last active
September 9, 2017 21:19
-
-
Save kav2k/e83641d3c95d3b2fe004f92a5e7592c8 to your computer and use it in GitHub Desktop.
My usual linter configuration (for browser extensions)
This file contains 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
{ | |
"env": { | |
"browser": true, | |
"webextensions": true, | |
"es6": true | |
}, | |
"extends": "eslint:recommended", | |
"rules": { | |
// Allow console | |
"no-console": "off", | |
// Style, indent/whitespace | |
"indent": ["warn", 2, {"SwitchCase": 1}], | |
"no-trailing-spaces": "warn", | |
"eol-last": "warn", | |
"no-multiple-empty-lines": "warn", | |
// Style, spacing | |
"space-unary-ops": ["warn", {"words": true, "nonwords": false}], | |
"space-infix-ops": "warn", | |
"keyword-spacing": "warn", | |
"space-before-blocks": ["warn", "always"], | |
"operator-linebreak": "warn", | |
"space-before-function-paren": ["warn", "never"], | |
"space-in-parens": ["warn", "never"], | |
"array-bracket-spacing": ["warn", "never"], | |
"no-spaced-func": "warn", | |
"key-spacing": ["warn", {"beforeColon": false, "afterColon": true}], | |
"quote-props": ["warn", "as-needed"], | |
// Style, braces | |
"brace-style": ["warn", "1tbs", {"allowSingleLine": true}], | |
"curly": ["warn", "multi-line"], | |
// Style, misc | |
"no-with": "warn", | |
"dot-notation": "warn", | |
"quotes": ["warn", "double", {"avoidEscape": true}], | |
"no-var": "warn", | |
"semi": ["warn", "always"] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
no-var
is probably the most controversial.