forked from wikimedia-gadgets/twinkle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
75 lines (75 loc) · 2.53 KB
/
.eslintrc.json
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
"parserOptions": {
"emcaVersion": 6
},
"extends": ["eslint:recommended"],
"root": true,
"env": {
"browser": true,
"jquery": true,
"es6": true
},
"globals": {
"mw": "readonly",
"Map": "readonly"
},
"ignorePatterns": ["scripts/", "tests/", "lib/"],
"rules": {
"no-console": "error",
"no-extra-parens": ["error", "all", { "nestedBinaryExpressions": false }],
"no-unreachable-loop": "error",
"block-scoped-var": "error",
"curly": "error",
"default-case": "error",
"dot-notation": "error",
"eqeqeq": "error",
"guard-for-in": "error",
"no-caller": "error",
"no-else-return": "error",
"no-implicit-coercion": ["error", { "boolean": false }],
"no-lone-blocks": "error",
"no-multi-spaces": ["error", { "ignoreEOLComments": true }],
"no-useless-return": "error",
"yoda": "error",
"block-spacing": "error",
"brace-style": ["error", "1tbs"],
"comma-dangle": "error",
"comma-spacing": ["error", { "before": false, "after": true }],
"computed-property-spacing": ["error", "never"],
"func-call-spacing": ["error", "never"],
"indent": ["error", "tab", { "outerIIFEBody": 0, "SwitchCase": 1 }],
"key-spacing": ["error", {"singleLine": {"beforeColon": false, "afterColon": true}}],
"keyword-spacing": ["error", { "after": true, "before": true}],
"linebreak-style": ["error", "unix"],
"no-array-constructor": "error",
"no-bitwise": "error",
"no-mixed-operators": "error",
"no-new-object": "error",
"no-tabs": ["error", { "allowIndentationTabs": true }],
"no-trailing-spaces": "error",
"no-unneeded-ternary": "error",
"no-whitespace-before-property": "error",
"quote-props": ["error", "consistent-as-needed"],
"quotes": ["error", "single", { "avoidEscape": true }],
"semi": ["error", "always"],
"space-before-blocks": "error",
"space-in-parens": ["error", "never"],
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": ["error", "always", { "line": { "exceptions": ["-"] }, "block": { "balanced": true } }],
"switch-colon-spacing": "error",
"no-nested-ternary": "error",
"no-restricted-syntax": [
"warn",
{
"message": "Using .done() is discouraged. See https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Asynchronous_code",
"selector": "MemberExpression > Identifier[name=\"done\"]"
},
{
"message": "Using .fail() is discouraged. See https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Asynchronous_code",
"selector": "MemberExpression > Identifier[name=\"fail\"]"
}
]
},
"reportUnusedDisableDirectives": true
}