forked from vufind-org/vufind
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
37 lines (35 loc) · 1.08 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
module.exports = {
ignorePatterns: ["themes/**/vendor/**"],
extends: "eslint:recommended",
env: {
"browser": true,
"es6": true,
"jquery": true
},
rules: {
// errors
"block-scoped-var": "error",
"func-names": ["error", "as-needed"],
"no-loop-func": "error",
"no-param-reassign": "error",
"no-shadow": "error",
"no-unused-expressions": "error",
// warnings
"dot-notation": "warn",
"eqeqeq": ["warn", "smart"],
"guard-for-in": "warn",
"key-spacing": ["warn", { "beforeColon": false, "afterColon": true }],
"no-lonely-if": "warn",
"no-console": ["warn", { "allow": ["warn", "error"] }],
"no-unneeded-ternary": "warn",
// fixed automatically
"block-spacing": ["warn", "always"],
"comma-spacing": ["warn", { "before": false, "after": true }],
"indent": ["error", 2],
"keyword-spacing": ["warn", { "before": true, "after": true }],
"linebreak-style": ["error", "unix"],
"no-multi-spaces": "warn",
"semi-spacing": ["warn", { "before": false, "after": true }],
"space-infix-ops": "warn"
}
};