-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
.eslintrc.json
204 lines (197 loc) · 6.51 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
{
"root": true,
"env": {
"browser": true,
"es2023": true
},
"parserOptions": {
"ecmaVersion": 2023,
"sourceType": "script"
},
"globals": {
"sap": true,
"jQuery": true
},
"rules": {
// Possible Errors
"for-direction": "error",
"getter-return": "error",
"no-async-promise-executor": "error",
"no-compare-neg-zero": "error",
"no-cond-assign": "error",
"no-console": "error",
"no-constant-condition": "error",
"no-control-regex": "error",
"no-debugger": "error",
"no-dupe-args": "error",
"no-dupe-else-if": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-empty-character-class": "error",
"no-empty": "error",
"no-ex-assign": "error",
"no-extra-boolean-cast": ["error", {"enforceForLogicalOperands": true}],
"no-extra-parens": ["error", "functions"],
"no-extra-semi": "error",
"no-func-assign": "error",
"no-import-assign": "error",
"no-inner-declarations": ["error", "functions"],
"no-invalid-regexp": "error",
"no-irregular-whitespace": ["error", {"skipStrings": false}],
"no-loss-of-precision": "error",
"no-misleading-character-class": "error",
"no-obj-calls": "error",
"no-promise-executor-return": "error",
"no-regex-spaces": "error",
"no-setter-return": "error",
"no-sparse-arrays": "error",
"no-unreachable-loop": "error",
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": ["error", {"enforceForOrderingRelations": true}],
"no-unsafe-optional-chaining": ["error", {"disallowArithmeticOperators": true}],
"no-useless-backreference": "error",
"require-atomic-updates": ["error", {"allowProperties": true}],
"use-isnan": "error",
"valid-typeof": ["error", {"requireStringLiterals": true}],
// Best Practices
"accessor-pairs": "error",
"block-scoped-var": "warn",
"consistent-return": "warn",
"curly": ["error", "all"],
"default-case-last": "error",
"default-case": "warn",
"default-param-last": "error",
"grouped-accessor-pairs": "error",
"no-alert": "error",
"no-caller": "error",
"no-case-declarations": "error",
"no-constant-binary-expression": "error",
"no-constructor-return": "error",
"no-div-regex": "error",
"no-empty-pattern": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-label": "error",
"no-fallthrough": "error",
"no-floating-decimal": "error",
"no-global-assign": "error",
"no-implicit-globals": ["error", {"lexicalBindings": true}],
"no-implied-eval": "error",
"no-iterator": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-new": "warn",
"no-nonoctal-decimal-escape": "error",
"no-octal-escape": "error",
"no-octal": "error",
"no-proto": "error",
"no-redeclare": "warn",
"no-return-assign": [ "error", "always"],
"no-script-url": "error",
"no-self-assign": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-unmodified-loop-condition": "error",
"no-unused-expressions": "warn",
"no-unused-labels": "error",
"no-useless-catch": "error",
"no-void": "error",
"no-warning-comments": ["warn", {"location": "anywhere"}],
"no-with": "error",
"prefer-object-has-own": "error",
"radix": ["error", "as-needed"],
"require-await": "error",
"wrap-iife": ["error", "any"],
"yoda": "error",
// Strict Mode
"strict": ["error", "function"],
// Variables
"no-delete-var": "error",
"no-label-var": "error",
"no-restricted-globals": ["warn", "closed", "defaultStatus", "frames",
"history", "innerHeight", "innerWidth", "length", "location", "menubar", "name",
"navigator", "opener", "pageXOffset", "pageYOffset", "parent", "personalbar",
"scrollbars", "status", "statusbar", "toolbar",
"blur", "close", "find", "focus", "moveBy", "moveTo", "open", "print", "resizeBy",
"resizeTo", "scroll", "scrollBy", "scrollTo", "stop",
"onload"
],
"no-shadow-restricted-names": "error",
"no-undef-init": "error",
"no-undef": "error",
"no-unused-vars": ["error", {"vars":"all", "args":"none"}],
"no-use-before-define": ["warn", "nofunc"],
// Stylistic Issues
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"camelcase": "warn",
"comma-dangle": ["error", "never"],
"consistent-this": ["warn", "that"],
"func-call-spacing": ["error", "never"],
"keyword-spacing": ["error", { "after": true }],
"linebreak-style": "error",
"max-nested-callbacks": ["warn", 3],
"new-cap": "warn",
"new-parens": "error",
"no-array-constructor": "error",
"no-lonely-if": "warn",
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
"no-nested-ternary": "error",
"no-new-object": "error",
"no-trailing-spaces": "error",
"quote-props": ["error", "as-needed", { "keywords": true, "unnecessary": false }],
"semi-spacing": ["warn", {"before": false, "after": true}],
"semi-style": ["error", "last"],
"semi": "error",
"space-infix-ops": "error",
"space-unary-ops": ["error", { "words": true, "nonwords": false }],
"template-tag-spacing": ["error", "never"],
"unicode-bom": ["error", "never"],
// ECMAScript 6
"arrow-parens": "error",
"arrow-spacing": "error",
"constructor-super": "error",
"generator-star-spacing": "error",
"no-class-assign": "error",
"no-confusing-arrow": "error",
"no-const-assign": "error",
"no-dupe-class-members": "error",
"no-duplicate-imports": "error",
"no-empty-static-block": "error",
"no-new-native-nonconstructor": "error",
"no-new-symbol": "error",
"no-this-before-super": "error",
"no-unused-private-class-members": "error",
"no-useless-computed-key": "error",
"no-useless-rename": "error",
"prefer-const": "error",
"prefer-numeric-literals": "error",
"require-yield": "error",
"rest-spread-spacing": ["error", "never"],
"symbol-description": "error",
"yield-star-spacing": "error",
// Deprecated
"valid-jsdoc": ["warn", { // => eslint-plugin-jsdoc
"requireReturn": false
}],
// Rules that have been decided to not activate
"arrow-body-style": "off",
"class-methods-use-this": "off",
"lines-between-class-members": "off",
"logical-assignment-operators": "off",
"max-classes-per-file": "off",
"no-await-in-loop": "off",
"no-multi-str": "off", // Enable when template literals (ES6 syntax) can be used
"no-restricted-exports": "off",
"no-restricted-imports": "off",
"no-restricted-properties": "off",
"no-return-await": "off",
"no-useless-constructor": "error", // JSDoc does not count as non-useless content
"sort-imports": "off",
"template-curly-spacing": "off"
}
}