Skip to content

Commit 4b8aa01

Browse files
committed
Switch to ESLint (#57)
1 parent 05b93ea commit 4b8aa01

File tree

2 files changed

+42
-3
lines changed

2 files changed

+42
-3
lines changed

.eslintrc.json

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"webextensions": true,
5+
"jquery": true,
6+
"es6": true
7+
},
8+
"extends": "eslint:recommended",
9+
"rules": {
10+
// Allow console
11+
"no-console": "off",
12+
13+
// Style, indent/whitespace
14+
"indent": ["warn", 2, {"SwitchCase": 1}],
15+
"no-trailing-spaces": "warn",
16+
"eol-last": "warn",
17+
"no-multiple-empty-lines": "warn",
18+
19+
// Style, spacing
20+
"space-unary-ops": ["warn", {"words": true, "nonwords": false}],
21+
"space-infix-ops": "warn",
22+
"keyword-spacing": "warn",
23+
"space-before-blocks": ["warn", "always"],
24+
"operator-linebreak": "warn",
25+
"space-before-function-paren": ["warn", "never"],
26+
"space-in-parens": ["warn", "never"],
27+
"array-bracket-spacing": ["warn", "never"],
28+
"no-spaced-func": "warn",
29+
"key-spacing": ["warn", {"beforeColon": false, "afterColon": true}],
30+
"quote-props": ["warn", "as-needed"],
31+
32+
// Style, braces
33+
"brace-style": ["warn", "1tbs", {"allowSingleLine": true}],
34+
"curly": ["warn", "multi-line"],
35+
36+
// Style, misc
37+
"no-with": "warn",
38+
"dot-notation": "warn",
39+
// "quotes": ["warn", "double", {"avoidEscape": true}], // Enforce later
40+
"semi": ["warn", "always"]
41+
}
42+
}

.jshintrc

-3
This file was deleted.

0 commit comments

Comments
 (0)