Skip to content

Commit 53b2b80

Browse files
committed
Add linting rules
1 parent 9cd25e3 commit 53b2b80

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

.eslintrc

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,36 @@
11
{
22
"env": {
3-
"browser": true,
43
"commonjs": true,
54
"es6": true,
65
"node": true
76
},
87
"extends": "eslint:recommended",
9-
"parserOptions": {
10-
"sourceType": "module"
11-
},
128
"rules": {
139
"comma-dangle": ["error", "never"],
14-
"indent": ["error", "tab"],
10+
"indent": ["error", "tab", {"MemberExpression": "off", "SwitchCase": 1}],
1511
"linebreak-style": ["error", "unix"],
1612
"quotes": ["error", "single"],
1713
"semi": ["error", "never"],
1814
"no-unused-vars": ["warn"],
19-
"no-console": 0
15+
"no-console": ["warn", { "allow": ["error"] }],
16+
"eqeqeq": ["error", "always"],
17+
"getter-return": ["error"],
18+
"id-length": "error",
19+
"no-eval": "error",
20+
"no-trailing-spaces": "error",
21+
"no-with": "error",
22+
"no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true, "allowTaggedTemplates": true }],
23+
"strict": ["warn", "safe"],
24+
"curly": ["error", "multi-line"],
25+
"unicode-bom": ["error", "never"],
26+
"vars-on-top": "error",
27+
"max-len": [1, 120, 2, { "ignoreComments": true }],
28+
"quote-props": [1, "consistent-as-needed"],
29+
"no-cond-assign": [2, "except-parens"],
30+
"space-infix-ops": 0,
31+
"default-case": 0,
32+
"no-else-return": 0,
33+
"no-param-reassign": 0,
34+
"new-cap": 2
2035
}
2136
}

0 commit comments

Comments
 (0)