@citrus-linting/eslint-config 0.22.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/rules/base.js CHANGED
@@ -1,320 +1,212 @@
1
1
  module.exports = {
2
- rules: {
3
- /*
4
- Best Practices
5
- */
6
- "accessor-pairs": [2],
7
- "array-callback-return": [2, { allowImplicit: true, checkForEach: true }],
8
- // "block-scoped-var": 2,
9
- // "class-methods-use-this": [2],
10
- // complexity: [2],
11
- // "consistent-return": [2],
12
- curly: [2],
13
- // "default-case": [2],
14
- "default-case-last": 2,
15
- "default-param-last": 2,
16
- "dot-location": [2, "property"],
17
- "dot-notation": [2],
18
- eqeqeq: [2],
19
- "grouped-accessor-pairs": [2, "getBeforeSet"],
20
- "guard-for-in": 2,
21
- // "max-classes-per-file": [2],
22
- "no-alert": 2,
23
- "no-caller": 2,
24
- "no-case-declarations": 2,
25
- "no-constructor-return": 2,
26
- "no-div-regex": 2,
27
- // "no-else-return": [2],
28
- // "no-empty-function": [2],
29
- "no-empty-pattern": 2,
30
- // "no-eq-null": 2,
31
- "no-eval": [2],
32
- "no-extend-native": [2],
33
- "no-extra-bind": 2,
34
- // "no-extra-label": 2,
35
- "no-fallthrough": [2],
36
- "no-floating-decimal": 2,
37
- "no-global-assign": [2],
38
- // "no-implicit-coercion": [2],
39
- // "no-implicit-globals": [2],
40
- "no-implied-eval": 2,
41
- "no-invalid-this": [2],
42
- "no-iterator": 2,
43
- "no-labels": [2],
44
- "no-lone-blocks": 2,
45
- "no-loop-func": 2,
46
- // "no-magic-numbers": [2],
47
- "no-multi-spaces": [2],
48
- "no-multi-str": 2,
49
- "no-new": 2,
50
- "no-new-func": 2,
51
- "no-new-wrappers": 2,
52
- "no-nonoctal-decimal-escape": 2,
53
- "no-octal": 2,
54
- "no-octal-escape": 2,
55
- "no-param-reassign": [2],
56
- "no-proto": 2,
57
- // "no-redeclare": [2],
58
- // "no-restricted-properties": [2],
59
- "no-return-assign": [2],
60
- "no-return-await": 2,
61
- "no-script-url": 2,
62
- "no-self-assign": [2],
63
- "no-self-compare": 2,
64
- "no-sequences": [2],
65
- "no-throw-literal": 2,
66
- "no-unmodified-loop-condition": 2,
67
- "no-unused-expressions": [2],
68
- // "no-unused-labels": 2,
69
- "no-useless-call": 2,
70
- "no-useless-catch": 2,
71
- "no-useless-concat": 2,
72
- "no-useless-escape": 2,
73
- "no-useless-return": 2,
74
- "no-void": [2],
75
- "no-warning-comments": [2],
76
- "no-with": 2,
77
- // "prefer-named-capture-group": 2,
78
- "prefer-promise-reject-errors": [2],
79
- "prefer-regex-literals": [2, { disallowRedundantWrapping: true }],
80
- radix: [2, "as-needed"],
81
- // "require-await": 2,
82
- // "require-unicode-regexp": 2,
83
- // "vars-on-top": 2,
84
- "wrap-iife": [2, "inside", { functionPrototypeMethods: true }],
85
- yoda: [2, "never", { exceptRange: true }],
86
-
87
- /*
88
- ECMAScript 6
89
- */
90
- "arrow-body-style": [2],
91
- "arrow-parens": [2, "as-needed"],
92
- "arrow-spacing": [2],
93
- "constructor-super": 2,
94
- "generator-star-spacing": [2, { named: "after", anonymous: "neither", method: "before" }],
95
- "no-class-assign": 2,
96
- // "no-confusing-arrow": [2],
97
- "no-const-assign": 2,
98
- "no-dupe-class-members": 2,
99
- "no-duplicate-imports": [2, { includeExports: true }],
100
- "no-new-symbol": 2,
101
- // "no-restricted-exports": [2],
102
- // "no-restricted-imports": [2],
103
- "no-this-before-super": 2,
104
- "no-useless-computed-key": [2, { enforceForClassMembers: true }],
105
- "no-useless-constructor": 2,
106
- "no-useless-rename": [2],
107
- "no-var": 2,
108
- "object-shorthand": [2, "always", { avoidExplicitReturnArrows: true }],
109
- "prefer-arrow-callback": [2],
110
- "prefer-const": [2, { destructuring: "all" }],
111
- "prefer-destructuring": [
112
- 2,
113
- {
114
- VariableDeclarator: { object: true, array: false },
115
- AssignmentExpression: { object: false, array: false }
116
- }
117
- ],
118
- "prefer-numeric-literals": 2,
119
- "prefer-rest-params": 2,
120
- "prefer-spread": 2,
121
- "prefer-template": 2,
122
- "require-yield": 2,
123
- "rest-spread-spacing": [2],
124
- // "sort-imports": [2],
125
- "symbol-description": 2,
126
- "template-curly-spacing": [2],
127
- "yield-star-spacing": [2],
128
-
129
- /*
130
- Possible Errors
131
- */
132
- "for-direction": 2,
133
- "getter-return": [2, { allowImplicit: true }],
134
- "no-async-promise-executor": 2,
135
- // "no-await-in-loop": 2,
136
- "no-compare-neg-zero": 2,
137
- "no-cond-assign": [2, "always"],
138
- // "no-console": [2],
139
- "no-constant-condition": [2, { checkLoops: false }],
140
- "no-control-regex": 2,
141
- "no-debugger": 2,
142
- "no-dupe-args": 2,
143
- "no-dupe-else-if": 2,
144
- "no-dupe-keys": 2,
145
- "no-duplicate-case": 2,
146
- "no-empty": [2, { allowEmptyCatch: true }],
147
- "no-empty-character-class": 2,
148
- "no-ex-assign": 2,
149
- "no-extra-boolean-cast": [2, { enforceForLogicalOperands: true }],
150
- "no-extra-parens": [2],
151
- // "no-extra-semi": 2,
152
- "no-func-assign": 2,
153
- "no-import-assign": 2,
154
- // "no-inner-declarations": [2],
155
- "no-invalid-regexp": [2],
156
- "no-irregular-whitespace": [2],
157
- "no-loss-of-precision": 2,
158
- "no-misleading-character-class": 2,
159
- "no-obj-calls": 2,
160
- "no-promise-executor-return": 2,
161
- "no-prototype-builtins": 2,
162
- "no-regex-spaces": 2,
163
- "no-setter-return": 2,
164
- "no-sparse-arrays": 2,
165
- "no-template-curly-in-string": 2,
166
- "no-unexpected-multiline": 2,
167
- "no-unreachable": 2,
168
- "no-unreachable-loop": [2],
169
- "no-unsafe-finally": 2,
170
- "no-unsafe-negation": [2, { enforceForOrderingRelations: true }],
171
- "no-unsafe-optional-chaining": [2, { disallowArithmeticOperators: true }],
172
- "no-useless-backreference": 2,
173
- // "require-atomic-updates": 2,
174
- "use-isnan": [2, { enforceForIndexOf: true }],
175
- "valid-typeof": [2, { requireStringLiterals: true }],
176
-
177
- /*
178
- Strict Mode
179
- */
180
- strict: [2],
181
-
182
- /*
183
- Stylistic Issues
184
- */
185
- "array-bracket-newline": [2, "consistent"],
186
- "array-bracket-spacing": [2],
187
- "array-element-newline": [2, "consistent"],
188
- "block-spacing": [2],
189
- "brace-style": [2],
190
- camelcase: [2, { properties: "never" }],
191
- // "capitalized-comments": [2],
192
- "comma-dangle": [2],
193
- "comma-spacing": [2],
194
- "comma-style": [2],
195
- "computed-property-spacing": [2],
196
- // "consistent-this": [2],
197
- "eol-last": [2],
198
- "func-call-spacing": [2],
199
- // "func-name-matching": [2],
200
- "func-names": [2, "never"],
201
- "func-style": [2, "declaration", { allowArrowFunctions: true }],
202
- "function-call-argument-newline": [2, "consistent"],
203
- "function-paren-newline": [2],
204
- // "id-denylist": [2],
205
- // "id-length": [2],
206
- // "id-match": [2],
207
- "implicit-arrow-linebreak": [2],
208
- indent: [2, 4, { SwitchCase: 1 }],
209
- "jsx-quotes": [2],
210
- "key-spacing": [2],
211
- "keyword-spacing": [2],
212
- // "line-comment-position": [2],
213
- "linebreak-style": [2],
214
- // "lines-around-comment": [2],
215
- "lines-between-class-members": [2, "always", { exceptAfterSingleLine: true }],
216
- // "max-depth": [2],
217
- "max-len": [2, { code: 100 }],
218
- // "max-lines": [2],
219
- // "max-lines-per-function": [2],
220
- // "max-nested-callbacks": [2],
221
- // "max-params": [2],
222
- // "max-statements": [2],
223
- // "max-statements-per-line": [2],
224
- // "multiline-comment-style": [2],
225
- "multiline-ternary": [2, "always-multiline"],
226
- "new-cap": [2],
227
- "new-parens": [2],
228
- "newline-per-chained-call": [2],
229
- "no-array-constructor": 2,
230
- "no-bitwise": [2],
231
- // "no-continue": 2,
232
- // "no-inline-comments": [2],
233
- // "no-lonely-if": 2,
234
- // "no-mixed-operators": [2],
235
- "no-mixed-spaces-and-tabs": [2],
236
- "no-multi-assign": [2],
237
- "no-multiple-empty-lines": [2, { max: 1 }],
238
- "no-negated-condition": 2,
239
- "no-nested-ternary": 2,
240
- "no-new-object": 2,
241
- // "no-plusplus": [2],
242
- // "no-restricted-syntax": [2],
243
- "no-tabs": [2],
244
- // "no-ternary": 2,
245
- "no-trailing-spaces": [2],
246
- "no-underscore-dangle": [2, { allowAfterThis: true, allowFunctionParams: false }],
247
- "no-unneeded-ternary": [2],
248
- "no-whitespace-before-property": 2,
249
- // "nonblock-statement-body-position": [2],
250
- "object-curly-newline": [2],
251
- "object-curly-spacing": [2, "always"],
252
- // "object-property-newline": [2],
253
- "one-var": [2, "never"],
254
- // "one-var-declaration-per-line": [2],
255
- "operator-assignment": [2],
256
- "operator-linebreak": [2, "none"],
257
- "padded-blocks": [2, "never"],
258
- "padding-line-between-statements": [
259
- 2,
260
- { blankLine: "always", prev: "cjs-import", next: "*" },
261
- { blankLine: "always", prev: "*", next: "cjs-import" },
262
- { blankLine: "any", prev: "cjs-import", next: "cjs-import" },
263
- { blankLine: "always", prev: "cjs-export", next: "*" },
264
- { blankLine: "always", prev: "*", next: "cjs-export" },
265
- { blankLine: "any", prev: "cjs-export", next: "cjs-export" },
266
- { blankLine: "always", prev: "import", next: "*" },
267
- { blankLine: "always", prev: "*", next: "import" },
268
- { blankLine: "any", prev: "import", next: "import" },
269
- { blankLine: "always", prev: "export", next: "*" },
270
- { blankLine: "always", prev: "*", next: "export" },
271
- { blankLine: "any", prev: "export", next: "export" },
272
- { blankLine: "always", prev: "multiline-block-like", next: "*" },
273
- { blankLine: "always", prev: "*", next: "multiline-block-like" }
274
- ],
275
- "prefer-exponentiation-operator": 2,
276
- "prefer-object-spread": 2,
277
- "quote-props": [2, "as-needed"],
278
- quotes: [2, "double", { allowTemplateLiterals: true }],
279
- semi: [2, "never"],
280
- "semi-spacing": [2],
281
- // "semi-style": [2],
282
- // "sort-keys": [2],
283
- // "sort-vars": [2],
284
- "space-before-blocks": [2],
285
- "space-before-function-paren": [
286
- 2,
287
- { anonymous: "never", named: "never", asyncArrow: "always" }
288
- ],
289
- "space-in-parens": [2],
290
- "space-infix-ops": [2],
291
- "space-unary-ops": [2],
292
- "spaced-comment": [2, "always", { markers: ["/"] }],
293
- "switch-colon-spacing": [2],
294
- "template-tag-spacing": [2],
295
- "unicode-bom": [2],
296
- // "wrap-regex": 2,
297
-
298
- /*
299
- Variables
300
- */
301
- // "init-declarations": [2],
302
- "no-delete-var": 2,
303
- // "no-label-var": 2,
304
- // "no-restricted-globals": [2],
305
- "no-shadow": [
306
- 2,
307
- {
308
- builtinGlobals: true,
309
- hoist: "never",
310
- allow: ["name", "status", "length", "open", "close"]
311
- }
312
- ],
313
- "no-shadow-restricted-names": 2,
314
- "no-undef": [2, { typeof: true }],
315
- "no-undef-init": 2,
316
- // "no-undefined": 2,
317
- "no-unused-vars": [2, { ignoreRestSiblings: true, caughtErrors: "all" }],
318
- "no-use-before-define": [2]
319
- }
2
+ "accessor-pairs": 2,
3
+ "array-callback-return": [2, { allowImplicit: true, checkForEach: true }],
4
+ "arrow-body-style": 2,
5
+ "block-scoped-var": 0,
6
+ camelcase: [2, { properties: "never" }],
7
+ "capitalized-comments": 0,
8
+ "class-methods-use-this": 0,
9
+ complexity: 0,
10
+ "consistent-return": 0,
11
+ "consistent-this": 0,
12
+ "constructor-super": 2,
13
+ curly: 2,
14
+ "default-case": 0,
15
+ "default-case-last": 2,
16
+ "default-param-last": 2,
17
+ "dot-notation": 2,
18
+ eqeqeq: 2,
19
+ "for-direction": 2,
20
+ "func-name-matching": 0,
21
+ "func-names": [2, "never"],
22
+ "func-style": [2, "declaration", { allowArrowFunctions: true }],
23
+ "getter-return": [2, { allowImplicit: true }],
24
+ "grouped-accessor-pairs": [2, "getBeforeSet"],
25
+ "guard-for-in": 2,
26
+ "id-denylist": 0,
27
+ "id-length": 0,
28
+ "id-match": 0,
29
+ "init-declarations": 0,
30
+ "logical-assignment-operators": [2, "always", { enforceForIfStatements: true }],
31
+ "max-classes-per-file": 0,
32
+ "max-depth": 0,
33
+ "max-lines": 0,
34
+ "max-lines-per-function": 0,
35
+ "max-nested-callbacks": 0,
36
+ "max-params": 0,
37
+ "max-statements": 0,
38
+ "new-cap": 2,
39
+ "no-alert": 2,
40
+ "no-array-constructor": 2,
41
+ "no-async-promise-executor": 2,
42
+ "no-await-in-loop": 0,
43
+ "no-bitwise": 2,
44
+ "no-caller": 2,
45
+ "no-case-declarations": 2,
46
+ "no-class-assign": 2,
47
+ "no-compare-neg-zero": 2,
48
+ "no-cond-assign": [2, "always"],
49
+ "no-console": 0,
50
+ "no-const-assign": 2,
51
+ "no-constant-binary-expression": 2,
52
+ "no-constant-condition": [2, { checkLoops: false }],
53
+ "no-constructor-return": 2,
54
+ "no-continue": 0,
55
+ "no-control-regex": 2,
56
+ "no-debugger": 2,
57
+ "no-delete-var": 2,
58
+ "no-div-regex": 2,
59
+ "no-dupe-args": 2,
60
+ "no-dupe-class-members": 2,
61
+ "no-dupe-else-if": 2,
62
+ "no-dupe-keys": 2,
63
+ "no-duplicate-case": 2,
64
+ "no-duplicate-imports": [2, { includeExports: true }],
65
+ "no-else-return": 0,
66
+ "no-empty": [2, { allowEmptyCatch: true }],
67
+ "no-empty-character-class": 2,
68
+ "no-empty-function": 0,
69
+ "no-empty-pattern": 2,
70
+ "no-empty-static-block": 2,
71
+ "no-eq-null": 0,
72
+ "no-eval": 2,
73
+ "no-ex-assign": 2,
74
+ "no-extend-native": 2,
75
+ "no-extra-bind": 2,
76
+ "no-extra-boolean-cast": [2, { enforceForLogicalOperands: true }],
77
+ "no-extra-label": 0,
78
+ "no-fallthrough": 2,
79
+ "no-func-assign": 2,
80
+ "no-global-assign": 2,
81
+ "no-implicit-coercion": 0,
82
+ "no-implicit-globals": 0,
83
+ "no-implied-eval": 2,
84
+ "no-import-assign": 2,
85
+ "no-inline-comments": 0,
86
+ "no-inner-declarations": 0,
87
+ "no-invalid-regexp": 2,
88
+ "no-invalid-this": 2,
89
+ "no-irregular-whitespace": 2,
90
+ "no-iterator": 2,
91
+ "no-label-var": 0,
92
+ "no-labels": 2,
93
+ "no-lone-blocks": 2,
94
+ "no-lonely-if": 0,
95
+ "no-loop-func": 2,
96
+ "no-loss-of-precision": 2,
97
+ "no-magic-numbers": 0,
98
+ "no-misleading-character-class": 2,
99
+ "no-multi-assign": 2,
100
+ "no-multi-str": 2,
101
+ "no-negated-condition": 2,
102
+ "no-nested-ternary": 2,
103
+ "no-new": 2,
104
+ "no-new-func": 2,
105
+ "no-new-native-nonconstructor": 2,
106
+ "no-new-wrappers": 2,
107
+ "no-nonoctal-decimal-escape": 2,
108
+ "no-obj-calls": 2,
109
+ "no-object-constructor": 2,
110
+ "no-octal": 2,
111
+ "no-octal-escape": 2,
112
+ "no-param-reassign": 2,
113
+ "no-plusplus": 0,
114
+ "no-promise-executor-return": 2,
115
+ "no-proto": 2,
116
+ "no-prototype-builtins": 2,
117
+ "no-redeclare": 0,
118
+ "no-regex-spaces": 2,
119
+ "no-restricted-exports": 0,
120
+ "no-restricted-globals": 0,
121
+ "no-restricted-imports": 0,
122
+ "no-restricted-properties": 0,
123
+ "no-restricted-syntax": 0,
124
+ "no-return-assign": 2,
125
+ "no-script-url": 2,
126
+ "no-self-assign": 2,
127
+ "no-self-compare": 2,
128
+ "no-sequences": 2,
129
+ "no-setter-return": 2,
130
+ "no-shadow": [
131
+ 2,
132
+ {
133
+ builtinGlobals: true,
134
+ hoist: "never",
135
+ allow: ["name", "status", "length", "open", "close"]
136
+ }
137
+ ],
138
+ "no-shadow-restricted-names": 2,
139
+ "no-sparse-arrays": 2,
140
+ "no-template-curly-in-string": 2,
141
+ "no-ternary": 0,
142
+ "no-this-before-super": 2,
143
+ "no-throw-literal": 2,
144
+ "no-undef": [2, { typeof: true }],
145
+ "no-undef-init": 2,
146
+ "no-undefined": 0,
147
+ "no-underscore-dangle": [2, { allowAfterThis: true, allowFunctionParams: false }],
148
+ "no-unexpected-multiline": 2,
149
+ "no-unmodified-loop-condition": 2,
150
+ "no-unneeded-ternary": 2,
151
+ "no-unreachable": 2,
152
+ "no-unreachable-loop": 2,
153
+ "no-unsafe-finally": 2,
154
+ "no-unsafe-negation": [2, { enforceForOrderingRelations: true }],
155
+ "no-unsafe-optional-chaining": [2, { disallowArithmeticOperators: true }],
156
+ "no-unused-expressions": 2,
157
+ "no-unused-labels": 0,
158
+ "no-unused-private-class-members": 2,
159
+ "no-unused-vars": [2, { ignoreRestSiblings: true, caughtErrors: "all" }],
160
+ "no-use-before-define": 2,
161
+ "no-useless-assignment": 2,
162
+ "no-useless-backreference": 2,
163
+ "no-useless-call": 2,
164
+ "no-useless-catch": 2,
165
+ "no-useless-computed-key": [2, { enforceForClassMembers: true }],
166
+ "no-useless-concat": 2,
167
+ "no-useless-constructor": 2,
168
+ "no-useless-escape": 2,
169
+ "no-useless-rename": 2,
170
+ "no-useless-return": 2,
171
+ "no-var": 2,
172
+ "no-void": 2,
173
+ "no-warning-comments": 2,
174
+ "no-with": 2,
175
+ "object-shorthand": [2, "always", { avoidExplicitReturnArrows: true }],
176
+ "one-var": [2, "never"],
177
+ "operator-assignment": 2,
178
+ "prefer-arrow-callback": 2,
179
+ "prefer-const": [2, { destructuring: "all" }],
180
+ "prefer-destructuring": [
181
+ 2,
182
+ {
183
+ VariableDeclarator: { object: true, array: false },
184
+ AssignmentExpression: { object: false, array: false }
185
+ }
186
+ ],
187
+ "prefer-exponentiation-operator": 2,
188
+ "prefer-named-capture-group": 0,
189
+ "prefer-numeric-literals": 2,
190
+ "prefer-object-has-own": 2,
191
+ "prefer-object-spread": 2,
192
+ "prefer-promise-reject-errors": 2,
193
+ "prefer-regex-literals": [2, { disallowRedundantWrapping: true }],
194
+ "prefer-rest-params": 2,
195
+ "prefer-spread": 2,
196
+ "prefer-template": 2,
197
+ radix: [2, "as-needed"],
198
+ "require-atomic-updates": 0,
199
+ "require-await": 0,
200
+ "require-unicode-regexp": 0,
201
+ "require-yield": 2,
202
+ "sort-imports": 0,
203
+ "sort-keys": 0,
204
+ "sort-vars": 0,
205
+ strict: 2,
206
+ "symbol-description": 2,
207
+ "unicode-bom": 2,
208
+ "use-isnan": [2, { enforceForIndexOf: true }],
209
+ "valid-typeof": [2, { requireStringLiterals: true }],
210
+ "vars-on-top": 0,
211
+ yoda: [2, "never", { exceptRange: true }]
320
212
  }