@cto.af/eslint-config 4.1.6 → 5.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/js.js CHANGED
@@ -1,391 +1,388 @@
1
- 'use strict';
1
+ export const rules = {
2
+ // [Possible Problems](https://eslint.org/docs/rules/#possible-problems)
3
+ 'array-callback-return': ['error', {allowImplicit: true}],
4
+ 'constructor-super': 'error',
5
+ 'for-direction': 'error',
6
+ 'getter-return': 'error',
7
+ 'no-async-promise-executor': 'error',
8
+ 'no-await-in-loop': 'off', // I'll figure these out myself.
9
+ 'no-class-assign': 'error',
10
+ 'no-compare-neg-zero': 'error',
11
+ 'no-cond-assign': 'error',
12
+ 'no-const-assign': 'error',
13
+ 'no-constant-binary-expression': 'error',
14
+ 'no-constant-condition': 'error',
15
+ 'no-constructor-return': 'error',
16
+ 'no-control-regex': 'error',
17
+ 'no-debugger': 'error',
18
+ 'no-dupe-args': 'error',
19
+ 'no-dupe-class-members': 'error',
20
+ 'no-dupe-else-if': 'error',
21
+ 'no-dupe-keys': 'error',
22
+ 'no-duplicate-case': 'error',
23
+ 'no-duplicate-imports': 'error',
24
+ 'no-empty-character-class': 'error',
25
+ 'no-empty-pattern': 'error',
26
+ 'no-ex-assign': 'error',
27
+ 'no-fallthrough': 'error',
28
+ 'no-func-assign': 'error',
29
+ 'no-import-assign': 'error',
30
+ 'no-inner-declarations': 'error',
31
+ 'no-invalid-regexp': 'error',
32
+ 'no-irregular-whitespace': 'error',
33
+ 'no-loss-of-precision': 'error',
34
+ 'no-misleading-character-class': 'error',
35
+ 'no-new-native-nonconstructor': 'error',
36
+ 'no-obj-calls': 'error',
37
+ 'no-promise-executor-return': 'error',
38
+ 'no-prototype-builtins': 'error',
39
+ 'no-self-assign': 'error',
40
+ 'no-self-compare': 'error',
41
+ 'no-setter-return': 'error',
42
+ 'no-sparse-arrays': 'error',
43
+ 'no-template-curly-in-string': 'error',
44
+ 'no-this-before-super': 'error',
45
+ 'no-undef': 'error',
46
+ 'no-unexpected-multiline': 'error',
47
+ 'no-unmodified-loop-condition': 'error',
48
+ 'no-unreachable': 'error',
49
+ 'no-unreachable-loop': 'error',
50
+ 'no-unsafe-finally': 'error',
51
+ 'no-unsafe-negation': 'error',
52
+ 'no-unsafe-optional-chaining': 'error',
53
+ 'no-unused-private-class-members': 'error',
54
+ 'no-unused-vars': [
55
+ 'error', {
56
+ args: 'all',
57
+ argsIgnorePattern: '^_',
58
+ caughtErrors: 'all',
59
+ caughtErrorsIgnorePattern: '^(_|ignore)',
60
+ varsIgnorePattern: '^_[^_]',
61
+ reportUsedIgnorePattern: true,
62
+ },
63
+ ],
64
+ 'no-use-before-define': 'error',
65
+ // Doesn't account for try blocks
66
+ // See https://github.com/eslint/eslint/issues/17579
67
+ 'no-useless-assignment': 'off',
68
+ 'no-useless-backreference': 'error',
69
+ 'require-atomic-updates': 'error',
70
+ 'use-isnan': 'error',
71
+ 'valid-typeof': ['error', {requireStringLiterals: true}],
2
72
 
3
- module.exports = {
4
- rules: {
5
- // [Possible Problems](https://eslint.org/docs/rules/#possible-problems)
6
- 'array-callback-return': ['error', {allowImplicit: true}],
7
- 'constructor-super': 'error',
8
- 'for-direction': 'error',
9
- 'getter-return': 'error',
10
- 'no-async-promise-executor': 'error',
11
- 'no-await-in-loop': 'off', // I'll figure these out myself.
12
- 'no-class-assign': 'error',
13
- 'no-compare-neg-zero': 'error',
14
- 'no-cond-assign': 'error',
15
- 'no-const-assign': 'error',
16
- 'no-constant-binary-expression': 'error',
17
- 'no-constant-condition': 'error',
18
- 'no-constructor-return': 'error',
19
- 'no-control-regex': 'error',
20
- 'no-debugger': 'error',
21
- 'no-dupe-args': 'error',
22
- 'no-dupe-class-members': 'error',
23
- 'no-dupe-else-if': 'error',
24
- 'no-dupe-keys': 'error',
25
- 'no-duplicate-case': 'error',
26
- 'no-duplicate-imports': 'error',
27
- 'no-empty-character-class': 'error',
28
- 'no-empty-pattern': 'error',
29
- 'no-ex-assign': 'error',
30
- 'no-fallthrough': 'error',
31
- 'no-func-assign': 'error',
32
- 'no-import-assign': 'error',
33
- 'no-inner-declarations': 'error',
34
- 'no-invalid-regexp': 'error',
35
- 'no-irregular-whitespace': 'error',
36
- 'no-loss-of-precision': 'error',
37
- 'no-misleading-character-class': 'error',
38
- 'no-new-native-nonconstructor': 'error',
39
- 'no-obj-calls': 'error',
40
- 'no-promise-executor-return': 'error',
41
- 'no-prototype-builtins': 'error',
42
- 'no-self-assign': 'error',
43
- 'no-self-compare': 'error',
44
- 'no-setter-return': 'error',
45
- 'no-sparse-arrays': 'error',
46
- 'no-template-curly-in-string': 'error',
47
- 'no-this-before-super': 'error',
48
- 'no-undef': 'error',
49
- 'no-unexpected-multiline': 'error',
50
- 'no-unmodified-loop-condition': 'error',
51
- 'no-unreachable': 'error',
52
- 'no-unreachable-loop': 'error',
53
- 'no-unsafe-finally': 'error',
54
- 'no-unsafe-negation': 'error',
55
- 'no-unsafe-optional-chaining': 'error',
56
- 'no-unused-private-class-members': 'error',
57
- 'no-unused-vars': [
58
- 'error', {
59
- args: 'all',
60
- argsIgnorePattern: '^_',
61
- caughtErrors: 'all',
62
- caughtErrorsIgnorePattern: '^(_|ignore)',
63
- varsIgnorePattern: '^_[^_]',
64
- reportUsedIgnorePattern: true,
65
- },
66
- ],
67
- 'no-use-before-define': 'error',
68
- // Doesn't account for try blocks
69
- // See https://github.com/eslint/eslint/issues/17579
70
- 'no-useless-assignment': 'off',
71
- 'no-useless-backreference': 'error',
72
- 'require-atomic-updates': 'error',
73
- 'use-isnan': 'error',
74
- 'valid-typeof': ['error', {requireStringLiterals: true}],
73
+ // [Suggestions](https://eslint.org/docs/rules/#suggestions)
74
+ 'accessor-pairs': 'error',
75
+ 'arrow-body-style': ['error', 'as-needed'],
76
+ 'block-scoped-var': 'error',
77
+ 'camelcase': 'off', // If I had started with this.
78
+ 'capitalized-comments': ['error', 'always', {
79
+ ignoreConsecutiveComments: true,
80
+ ignorePattern: 'c8',
81
+ }],
82
+ 'class-methods-use-this': 'warn',
83
+ // This one is pedantic even for me.
84
+ 'complexity': 'off',
85
+ 'consistent-return': 'error',
86
+ 'consistent-this': 'off', // Not needed anymore with =>
87
+ 'curly': ['error', 'multi-line'],
88
+ // I use exhastive cases a lot, which makes the default unreachable
89
+ 'default-case': 'off',
90
+ 'default-case-last': 'error',
91
+ 'default-param-last': 'error',
92
+ 'dot-notation': 'error',
93
+ 'eqeqeq': ['error', 'always', {null: 'ignore'}],
94
+ 'func-name-matching': 'error',
95
+ 'func-names': ['error', 'as-needed'],
96
+ 'func-style': ['error', 'declaration', {allowArrowFunctions: true}],
97
+ 'grouped-accessor-pairs': 'error',
98
+ 'guard-for-in': 'error',
99
+ 'id-denylist': 'off', // Not needed
100
+ 'id-length': 'off', // Not needed
101
+ 'id-match': 'off', // Not needed
102
+ 'init-declarations': 'error',
103
+ 'logical-assignment-operators': 'off', // No.
104
+ 'max-classes-per-file': 'off', // No.
105
+ 'max-depth': 'off', // No.
106
+ 'max-lines': 'off', // No.
107
+ 'max-lines-per-function': 'off', // No.
108
+ 'max-nested-callbacks': 'off', // No.
109
+ 'max-params': ['error', 4],
110
+ 'max-statements': 'off', // No.
111
+ 'new-cap': 'error',
112
+ 'no-alert': 'error',
113
+ 'no-array-constructor': 'error',
114
+ 'no-bitwise': 'off', // Lol. Not in these projects
115
+ 'no-caller': 'error',
116
+ 'no-case-declarations': 'error',
117
+ 'no-console': 'error',
118
+ 'no-continue': 'off', // Why?
119
+ 'no-delete-var': 'error',
120
+ 'no-div-regex': 'error',
121
+ 'no-else-return': 'error',
122
+ 'no-empty': 'error',
123
+ 'no-empty-function': 'error',
124
+ 'no-empty-static-block': 'error',
125
+ 'no-eq-null': 'off', // I disagree with this one.
126
+ 'no-eval': 'error',
127
+ 'no-extend-native': 'error',
128
+ 'no-extra-bind': 'error',
129
+ 'no-extra-boolean-cast': 'error',
130
+ 'no-extra-label': 'error',
131
+ 'no-global-assign': 'error',
132
+ 'no-implicit-coercion': 'error',
133
+ 'no-implicit-globals': 'error',
134
+ 'no-implied-eval': 'error',
135
+ 'no-inline-comments': 'off', // Meta.
136
+ 'no-invalid-this': 'error',
137
+ 'no-iterator': 'error',
138
+ 'no-label-var': 'error',
139
+ 'no-labels': 'error',
140
+ 'no-lone-blocks': 'error',
141
+ 'no-lonely-if': 'error',
142
+ 'no-loop-func': 'error',
143
+ 'no-magic-numbers': 'off', // No shot at this for node-cbor. For other projects, yes.
144
+ 'no-multi-assign': 'error',
145
+ 'no-multi-str': 'error',
146
+ 'no-negated-condition': 'error',
147
+ 'no-nested-ternary': 'error',
148
+ 'no-new': 'error',
149
+ 'no-new-func': 'error',
150
+ 'no-new-wrappers': 'warn',
151
+ 'no-nonoctal-decimal-escape': 'error',
152
+ 'no-object-constructor': 'error',
153
+ 'no-octal': 'error',
154
+ 'no-octal-escape': 'warn',
155
+ 'no-param-reassign': 'off', // I do this all the time.
156
+ 'no-plusplus': 'off', // What?
157
+ 'no-proto': 'error',
158
+ 'no-redeclare': 'error',
159
+ 'no-regex-spaces': 'error',
160
+ 'no-restricted-exports': 'off', // Not needed
161
+ 'no-restricted-globals': 'off', // Not needed
162
+ 'no-restricted-imports': 'off', // Not needed
163
+ 'no-restricted-properties': 'off', // Not needed
164
+ 'no-restricted-syntax': 'off', // Not needed
165
+ 'no-return-assign': 'error',
166
+ 'no-script-url': 'error',
167
+ 'no-sequences': 'error',
168
+ 'no-shadow': 'error',
169
+ 'no-shadow-restricted-names': 'error',
170
+ 'no-ternary': 'off', // No.
171
+ 'no-throw-literal': 'error',
172
+ 'no-undef-init': 'off', // Turns out I need this often enough
173
+ 'no-undefined': 'off', // No.
174
+ 'no-underscore-dangle': 'off', // Maybe one day.
175
+ 'no-unneeded-ternary': 'error',
176
+ 'no-unused-expressions': ['error', {allowShortCircuit: true}],
177
+ 'no-unused-labels': 'error',
178
+ 'no-useless-call': 'error',
179
+ 'no-useless-catch': 'error',
180
+ 'no-useless-computed-key': 'error',
181
+ 'no-useless-concat': 'error',
182
+ 'no-useless-constructor': 'off', // I like useless constructors
183
+ 'no-useless-escape': 'error',
184
+ 'no-useless-rename': 'error',
185
+ 'no-useless-return': 'error',
186
+ 'no-var': 'error',
187
+ 'no-void': 'error',
188
+ 'no-warning-comments': 'off', // Only turn this on periodically
189
+ 'no-with': 'error',
190
+ 'object-shorthand': 'error',
191
+ 'one-var': ['error', 'never'],
192
+ 'operator-assignment': 'error',
193
+ 'prefer-arrow-callback': 'error',
194
+ 'prefer-const': 'error',
195
+ 'prefer-destructuring': 'error',
196
+ 'prefer-exponentiation-operator': 'error',
197
+ 'prefer-named-capture-group': 'error',
198
+ 'prefer-numeric-literals': 'error',
199
+ 'prefer-object-has-own': 'off', // Not yet
200
+ 'prefer-object-spread': 'error',
201
+ 'prefer-promise-reject-errors': 'warn',
202
+ 'prefer-regex-literals': 'error',
203
+ 'prefer-rest-params': 'error',
204
+ 'prefer-spread': 'error',
205
+ 'prefer-template': 'error',
206
+ 'radix': 'error',
207
+ 'require-await': 'error',
208
+ 'require-unicode-regexp': 'off', // No.
209
+ 'require-yield': 'error',
210
+ 'sort-imports': 'error',
211
+ 'sort-keys': 'off', // Pedantic
212
+ 'sort-vars': 'off', // Pedantic
213
+ 'strict': ['error', 'global'],
214
+ 'symbol-description': 'error',
215
+ 'unicode-bom': 'error',
216
+ 'vars-on-top': 'error',
217
+ 'yoda': ['error', 'never', {exceptRange: true}],
75
218
 
76
- // [Suggestions](https://eslint.org/docs/rules/#suggestions)
77
- 'accessor-pairs': 'error',
78
- 'arrow-body-style': ['error', 'as-needed'],
79
- 'block-scoped-var': 'error',
80
- 'camelcase': 'off', // If I had started with this.
81
- 'capitalized-comments': ['error', 'always', {
82
- ignoreConsecutiveComments: true,
83
- ignorePattern: 'c8',
84
- }],
85
- 'class-methods-use-this': 'warn',
86
- // This one is pedantic even for me.
87
- 'complexity': 'off',
88
- 'consistent-return': 'error',
89
- 'consistent-this': 'off', // Not needed anymore with =>
90
- 'curly': ['error', 'multi-line'],
91
- // I use exhastive cases a lot, which makes the default unreachable
92
- 'default-case': 'off',
93
- 'default-case-last': 'error',
94
- 'default-param-last': 'error',
95
- 'dot-notation': 'error',
96
- 'eqeqeq': ['error', 'always', {null: 'ignore'}],
97
- 'func-name-matching': 'error',
98
- 'func-names': ['error', 'as-needed'],
99
- 'func-style': ['error', 'declaration', {allowArrowFunctions: true}],
100
- 'grouped-accessor-pairs': 'error',
101
- 'guard-for-in': 'error',
102
- 'id-denylist': 'off', // Not needed
103
- 'id-length': 'off', // Not needed
104
- 'id-match': 'off', // Not needed
105
- 'init-declarations': 'error',
106
- 'logical-assignment-operators': 'off', // No.
107
- 'max-classes-per-file': 'off', // No.
108
- 'max-depth': 'off', // No.
109
- 'max-lines': 'off', // No.
110
- 'max-lines-per-function': 'off', // No.
111
- 'max-nested-callbacks': 'off', // No.
112
- 'max-params': ['error', 4],
113
- 'max-statements': 'off', // No.
114
- 'new-cap': 'error',
115
- 'no-alert': 'error',
116
- 'no-array-constructor': 'error',
117
- 'no-bitwise': 'off', // Lol. Not in these projects
118
- 'no-caller': 'error',
119
- 'no-case-declarations': 'error',
120
- 'no-console': 'error',
121
- 'no-continue': 'off', // Why?
122
- 'no-delete-var': 'error',
123
- 'no-div-regex': 'error',
124
- 'no-else-return': 'error',
125
- 'no-empty': 'error',
126
- 'no-empty-function': 'error',
127
- 'no-empty-static-block': 'error',
128
- 'no-eq-null': 'off', // I disagree with this one.
129
- 'no-eval': 'error',
130
- 'no-extend-native': 'error',
131
- 'no-extra-bind': 'error',
132
- 'no-extra-boolean-cast': 'error',
133
- 'no-extra-label': 'error',
134
- 'no-global-assign': 'error',
135
- 'no-implicit-coercion': 'error',
136
- 'no-implicit-globals': 'error',
137
- 'no-implied-eval': 'error',
138
- 'no-inline-comments': 'off', // Meta.
139
- 'no-invalid-this': 'error',
140
- 'no-iterator': 'error',
141
- 'no-label-var': 'error',
142
- 'no-labels': 'error',
143
- 'no-lone-blocks': 'error',
144
- 'no-lonely-if': 'error',
145
- 'no-loop-func': 'error',
146
- 'no-magic-numbers': 'off', // No shot at this for node-cbor. For other projects, yes.
147
- 'no-multi-assign': 'error',
148
- 'no-multi-str': 'error',
149
- 'no-negated-condition': 'error',
150
- 'no-nested-ternary': 'error',
151
- 'no-new': 'error',
152
- 'no-new-func': 'error',
153
- 'no-new-wrappers': 'warn',
154
- 'no-nonoctal-decimal-escape': 'error',
155
- 'no-object-constructor': 'error',
156
- 'no-octal': 'error',
157
- 'no-octal-escape': 'warn',
158
- 'no-param-reassign': 'off', // I do this all the time.
159
- 'no-plusplus': 'off', // What?
160
- 'no-proto': 'error',
161
- 'no-redeclare': 'error',
162
- 'no-regex-spaces': 'error',
163
- 'no-restricted-exports': 'off', // Not needed
164
- 'no-restricted-globals': 'off', // Not needed
165
- 'no-restricted-imports': 'off', // Not needed
166
- 'no-restricted-properties': 'off', // Not needed
167
- 'no-restricted-syntax': 'off', // Not needed
168
- 'no-return-assign': 'error',
169
- 'no-script-url': 'error',
170
- 'no-sequences': 'error',
171
- 'no-shadow': 'error',
172
- 'no-shadow-restricted-names': 'error',
173
- 'no-ternary': 'off', // No.
174
- 'no-throw-literal': 'error',
175
- 'no-undef-init': 'off', // Turns out I need this often enough
176
- 'no-undefined': 'off', // No.
177
- 'no-underscore-dangle': 'off', // Maybe one day.
178
- 'no-unneeded-ternary': 'error',
179
- 'no-unused-expressions': ['error', {allowShortCircuit: true}],
180
- 'no-unused-labels': 'error',
181
- 'no-useless-call': 'error',
182
- 'no-useless-catch': 'error',
183
- 'no-useless-computed-key': 'error',
184
- 'no-useless-concat': 'error',
185
- 'no-useless-constructor': 'off', // I like useless constructors
186
- 'no-useless-escape': 'error',
187
- 'no-useless-rename': 'error',
188
- 'no-useless-return': 'error',
189
- 'no-var': 'error',
190
- 'no-void': 'error',
191
- 'no-warning-comments': 'off', // Only turn this on periodically
192
- 'no-with': 'error',
193
- 'object-shorthand': 'error',
194
- 'one-var': ['error', 'never'],
195
- 'operator-assignment': 'error',
196
- 'prefer-arrow-callback': 'error',
197
- 'prefer-const': 'error',
198
- 'prefer-destructuring': 'error',
199
- 'prefer-exponentiation-operator': 'error',
200
- 'prefer-named-capture-group': 'error',
201
- 'prefer-numeric-literals': 'error',
202
- 'prefer-object-has-own': 'off', // Not yet
203
- 'prefer-object-spread': 'error',
204
- 'prefer-promise-reject-errors': 'warn',
205
- 'prefer-regex-literals': 'error',
206
- 'prefer-rest-params': 'error',
207
- 'prefer-spread': 'error',
208
- 'prefer-template': 'error',
209
- 'radix': 'error',
210
- 'require-await': 'error',
211
- 'require-unicode-regexp': 'off', // No.
212
- 'require-yield': 'error',
213
- 'sort-imports': 'error',
214
- 'sort-keys': 'off', // Pedantic
215
- 'sort-vars': 'off', // Pedantic
216
- 'strict': ['error', 'global'],
217
- 'symbol-description': 'error',
218
- 'unicode-bom': 'error',
219
- 'vars-on-top': 'error',
220
- 'yoda': ['error', 'never', {exceptRange: true}],
219
+ // [Stylistc](https://eslint.style/packages/default)
220
+ '@stylistic/array-bracket-newline': ['error', 'consistent'],
221
+ '@stylistic/array-bracket-spacing': ['error', 'never'],
222
+ '@stylistic/array-element-newline': ['error', 'consistent'],
223
+ '@stylistic/arrow-parens': ['error', 'as-needed'],
224
+ '@stylistic/arrow-spacing': 'error',
225
+ '@stylistic/block-spacing': ['error', 'always'],
226
+ '@stylistic/brace-style': ['error', '1tbs'],
227
+ '@stylistic/comma-dangle': ['error', {
228
+ arrays: 'always-multiline',
229
+ objects: 'always-multiline',
230
+ imports: 'always-multiline',
231
+ exports: 'always-multiline',
232
+ functions: 'never',
233
+ enums: 'always-multiline',
234
+ tuples: 'always-multiline',
235
+ }],
236
+ '@stylistic/comma-spacing': 'error',
237
+ '@stylistic/comma-style': ['error', 'last'],
238
+ '@stylistic/computed-property-spacing': 'error',
239
+ '@stylistic/curly-newline': 'off', // Too much config
240
+ '@stylistic/dot-location': ['error', 'property'],
241
+ '@stylistic/eol-last': 'error',
242
+ '@stylistic/func-call-spacing': 'off', // Renamed
243
+ '@stylistic/function-call-argument-newline': ['error', 'consistent'],
244
+ '@stylistic/function-call-spacing': 'error',
245
+ '@stylistic/function-paren-newline': ['error', 'consistent'],
246
+ '@stylistic/generator-star-spacing': 'error',
247
+ '@stylistic/implicit-arrow-linebreak': ['error', 'beside'],
248
+ '@stylistic/indent': ['error', 2, {SwitchCase: 1}],
249
+ '@stylistic/indent-binary-ops': 'off', // Not good enough
221
250
 
222
- // [Stylistc](https://eslint.style/packages/default)
223
- '@stylistic/array-bracket-newline': ['error', 'consistent'],
224
- '@stylistic/array-bracket-spacing': ['error', 'never'],
225
- '@stylistic/array-element-newline': ['error', 'consistent'],
226
- '@stylistic/arrow-parens': ['error', 'as-needed'],
227
- '@stylistic/arrow-spacing': 'error',
228
- '@stylistic/block-spacing': ['error', 'always'],
229
- '@stylistic/brace-style': ['error', '1tbs'],
230
- '@stylistic/comma-dangle': ['error', {
231
- arrays: 'always-multiline',
232
- objects: 'always-multiline',
233
- imports: 'always-multiline',
234
- exports: 'always-multiline',
235
- functions: 'never',
236
- enums: 'always-multiline',
237
- tuples: 'always-multiline',
238
- }],
239
- '@stylistic/comma-spacing': 'error',
240
- '@stylistic/comma-style': ['error', 'last'],
241
- '@stylistic/computed-property-spacing': 'error',
242
- '@stylistic/dot-location': ['error', 'property'],
243
- '@stylistic/eol-last': 'error',
244
- '@stylistic/func-call-spacing': 'off', // Renamed
245
- '@stylistic/function-call-argument-newline': ['error', 'consistent'],
246
- '@stylistic/function-call-spacing': 'error',
247
- '@stylistic/function-paren-newline': ['error', 'consistent'],
248
- '@stylistic/generator-star-spacing': 'error',
249
- '@stylistic/implicit-arrow-linebreak': ['error', 'beside'],
250
- '@stylistic/indent': ['error', 2, {SwitchCase: 1}],
251
- '@stylistic/indent-binary-ops': 'off', // Not good enough
251
+ '@stylistic/jsx-child-element-spacing': 'off', // Not needed
252
+ '@stylistic/jsx-closing-bracket-location': 'off', // Not needed
253
+ '@stylistic/jsx-closing-tag-location': 'off', // Not needed
254
+ '@stylistic/jsx-curly-brace-presence': 'off', // Not needed
255
+ '@stylistic/jsx-curly-newline': 'off', // Not needed
256
+ '@stylistic/jsx-curly-spacing': 'off', // Not needed
257
+ '@stylistic/jsx-equals-spacing': 'off', // Not needed
258
+ '@stylistic/jsx-first-prop-new-line': 'off', // Not needed
259
+ '@stylistic/jsx-function-call-newline': 'off', // Not needed
260
+ '@stylistic/jsx-indent-props': 'off', // Not needed
261
+ '@stylistic/jsx-max-props-per-line': 'off', // Not needed
262
+ '@stylistic/jsx-newline': 'off', // Not needed
263
+ '@stylistic/jsx-one-expression-per-line': 'off', // Not needed
264
+ '@stylistic/jsx-pascal-case': 'off', // Not needed
265
+ '@stylistic/jsx-props-no-multi-spaces': 'off', // Not needed
266
+ '@stylistic/jsx-quotes': 'off', // Not needed
267
+ '@stylistic/jsx-self-closing-comp': 'off', // Not needed
268
+ '@stylistic/jsx-sort-props': 'off', // Not needed
269
+ '@stylistic/jsx-tag-spacing': 'off', // Not needed
270
+ '@stylistic/jsx-wrap-multilines': 'off', // Not needed
252
271
 
253
- '@stylistic/jsx-child-element-spacing': 'off', // Not needed
254
- '@stylistic/jsx-closing-bracket-location': 'off', // Not needed
255
- '@stylistic/jsx-closing-tag-location': 'off', // Not needed
256
- '@stylistic/jsx-curly-brace-presence': 'off', // Not needed
257
- '@stylistic/jsx-curly-newline': 'off', // Not needed
258
- '@stylistic/jsx-curly-spacing': 'off', // Not needed
259
- '@stylistic/jsx-equals-spacing': 'off', // Not needed
260
- '@stylistic/jsx-first-prop-new-line': 'off', // Not needed
261
- '@stylistic/jsx-function-call-newline': 'off', // Not needed
262
- '@stylistic/jsx-indent-props': 'off', // Not needed
263
- '@stylistic/jsx-max-props-per-line': 'off', // Not needed
264
- '@stylistic/jsx-newline': 'off', // Not needed
265
- '@stylistic/jsx-one-expression-per-line': 'off', // Not needed
266
- '@stylistic/jsx-pascal-case': 'off', // Not needed
267
- '@stylistic/jsx-props-no-multi-spaces': 'off', // Not needed
268
- '@stylistic/jsx-quotes': 'off', // Not needed
269
- '@stylistic/jsx-self-closing-comp': 'off', // Not needed
270
- '@stylistic/jsx-sort-props': 'off', // Not needed
271
- '@stylistic/jsx-tag-spacing': 'off', // Not needed
272
- '@stylistic/jsx-wrap-multilines': 'off', // Not needed
272
+ '@stylistic/key-spacing': 'error',
273
+ '@stylistic/keyword-spacing': 'error',
274
+ '@stylistic/line-comment-position': 'off', // Too hard to change
275
+ '@stylistic/linebreak-style': 'error',
276
+ '@stylistic/lines-around-comment': ['error', {
277
+ allowArrayStart: true,
278
+ allowBlockStart: true,
279
+ allowClassStart: true,
280
+ allowEnumStart: true,
281
+ allowInterfaceStart: true,
282
+ allowObjectStart: true,
283
+ allowTypeStart: true,
284
+ }],
285
+ '@stylistic/lines-between-class-members': ['error', 'always', {
286
+ exceptAfterSingleLine: true,
287
+ }],
288
+ '@stylistic/max-len': ['error', 80, {
289
+ ignoreRegExpLiterals: true,
290
+ ignoreStrings: true,
291
+ ignoreTemplateLiterals: true,
292
+ ignoreUrls: true,
293
+ }],
294
+ '@stylistic/max-statements-per-line': 'off',
295
+ '@stylistic/member-delimiter-style': 'off',
296
+ '@stylistic/multiline-comment-style': 'off', // Not important
297
+ '@stylistic/multiline-ternary': ['error', 'always-multiline'],
298
+ '@stylistic/new-parens': 'error',
299
+ '@stylistic/newline-per-chained-call': 'error',
300
+ '@stylistic/no-confusing-arrow': 'error',
301
+ '@stylistic/no-extra-parens': 'off', // Too fiddly to torn off everything.
302
+ '@stylistic/no-extra-semi': 'error',
303
+ '@stylistic/no-floating-decimal': 'error',
304
+ '@stylistic/no-mixed-operators': 'error',
305
+ '@stylistic/no-mixed-spaces-and-tabs': 'error',
306
+ '@stylistic/no-multi-spaces': 'error',
307
+ '@stylistic/no-multiple-empty-lines': ['error', {max: 1}],
308
+ '@stylistic/no-tabs': 'error',
309
+ '@stylistic/no-trailing-spaces': 'error',
310
+ '@stylistic/no-whitespace-before-property': 'error',
311
+ '@stylistic/nonblock-statement-body-position': 'error',
312
+ '@stylistic/object-curly-newline': 'error',
313
+ '@stylistic/object-curly-spacing': ['error', 'never'],
314
+ '@stylistic/object-property-newline': ['error', {allowAllPropertiesOnSameLine: true}],
315
+ '@stylistic/one-var-declaration-per-line': 'error',
316
+ '@stylistic/operator-linebreak': ['error', 'after'],
317
+ '@stylistic/padded-blocks': ['error', 'never'],
318
+ '@stylistic/padding-line-between-statements': 'error',
319
+ '@stylistic/quote-props': ['error', 'consistent-as-needed'],
320
+ '@stylistic/quotes': ['error', 'single', {avoidEscape: true}],
321
+ '@stylistic/rest-spread-spacing': ['error', 'never'],
322
+ '@stylistic/semi': ['error', 'always'],
323
+ '@stylistic/semi-spacing': 'error',
324
+ '@stylistic/semi-style': ['error'],
325
+ '@stylistic/space-before-blocks': 'error',
326
+ '@stylistic/space-before-function-paren': ['error', 'never'],
327
+ '@stylistic/space-in-parens': 'error',
328
+ '@stylistic/space-infix-ops': ['error', {int32Hint: false}],
329
+ '@stylistic/space-unary-ops': 'error',
330
+ '@stylistic/spaced-comment': ['error', 'always'],
331
+ '@stylistic/switch-colon-spacing': 'error',
332
+ '@stylistic/template-curly-spacing': 'error',
333
+ '@stylistic/template-tag-spacing': 'error',
334
+ '@stylistic/type-annotation-spacing': 'off', // Not TS.
335
+ '@stylistic/type-generic-spacing': 'off', // Not TS.
336
+ '@stylistic/type-named-tuple-spacing': 'off', // Not TS.
337
+ '@stylistic/wrap-iife': 'error',
338
+ '@stylistic/wrap-regex': 'off', // No.
339
+ '@stylistic/yield-star-spacing': ['error', 'before'],
273
340
 
274
- '@stylistic/key-spacing': 'error',
275
- '@stylistic/keyword-spacing': 'error',
276
- '@stylistic/line-comment-position': 'off', // Too hard to change
277
- '@stylistic/linebreak-style': 'error',
278
- '@stylistic/lines-around-comment': ['error', {
279
- allowArrayStart: true,
280
- allowBlockStart: true,
281
- allowClassStart: true,
282
- allowEnumStart: true,
283
- allowInterfaceStart: true,
284
- allowObjectStart: true,
285
- allowTypeStart: true,
286
- }],
287
- '@stylistic/lines-between-class-members': ['error', 'always', {
288
- exceptAfterSingleLine: true,
289
- }],
290
- '@stylistic/max-len': ['error', 80, {
291
- ignoreRegExpLiterals: true,
292
- ignoreStrings: true,
293
- ignoreTemplateLiterals: true,
294
- ignoreUrls: true,
295
- }],
296
- '@stylistic/max-statements-per-line': 'off',
297
- '@stylistic/member-delimiter-style': 'off',
298
- '@stylistic/multiline-comment-style': 'off', // Not important
299
- '@stylistic/multiline-ternary': ['error', 'always-multiline'],
300
- '@stylistic/new-parens': 'error',
301
- '@stylistic/newline-per-chained-call': 'error',
302
- '@stylistic/no-confusing-arrow': 'error',
303
- '@stylistic/no-extra-parens': 'off', // Too fiddly to torn off everything.
304
- '@stylistic/no-extra-semi': 'error',
305
- '@stylistic/no-floating-decimal': 'error',
306
- '@stylistic/no-mixed-operators': 'error',
307
- '@stylistic/no-mixed-spaces-and-tabs': 'error',
308
- '@stylistic/no-multi-spaces': 'error',
309
- '@stylistic/no-multiple-empty-lines': ['error', {max: 1}],
310
- '@stylistic/no-tabs': 'error',
311
- '@stylistic/no-trailing-spaces': 'error',
312
- '@stylistic/no-whitespace-before-property': 'error',
313
- '@stylistic/nonblock-statement-body-position': 'error',
314
- '@stylistic/object-curly-newline': 'error',
315
- '@stylistic/object-curly-spacing': ['error', 'never'],
316
- '@stylistic/object-property-newline': ['error', {allowAllPropertiesOnSameLine: true}],
317
- '@stylistic/one-var-declaration-per-line': 'error',
318
- '@stylistic/operator-linebreak': ['error', 'after'],
319
- '@stylistic/padded-blocks': ['error', 'never'],
320
- '@stylistic/padding-line-between-statements': 'error',
321
- '@stylistic/quote-props': ['error', 'consistent-as-needed'],
322
- '@stylistic/quotes': ['error', 'single', {avoidEscape: true}],
323
- '@stylistic/rest-spread-spacing': ['error', 'never'],
324
- '@stylistic/semi': ['error', 'always'],
325
- '@stylistic/semi-spacing': 'error',
326
- '@stylistic/semi-style': ['error'],
327
- '@stylistic/space-before-blocks': 'error',
328
- '@stylistic/space-before-function-paren': ['error', 'never'],
329
- '@stylistic/space-in-parens': 'error',
330
- '@stylistic/space-infix-ops': ['error', {int32Hint: false}],
331
- '@stylistic/space-unary-ops': 'error',
332
- '@stylistic/spaced-comment': ['error', 'always'],
333
- '@stylistic/switch-colon-spacing': 'error',
334
- '@stylistic/template-curly-spacing': 'error',
335
- '@stylistic/template-tag-spacing': 'error',
336
- '@stylistic/type-annotation-spacing': 'off', // Not TS.
337
- '@stylistic/type-generic-spacing': 'off', // Not TS.
338
- '@stylistic/type-named-tuple-spacing': 'off', // Not TS.
339
- '@stylistic/wrap-iife': 'error',
340
- '@stylistic/wrap-regex': 'off', // No.
341
- '@stylistic/yield-star-spacing': ['error', 'before'],
341
+ // [Possible Errors](https://github.com/eslint-community/eslint-plugin-n#possible-errors)
342
+ 'n/handle-callback-err': ['error', 'er'],
343
+ 'n/no-callback-literal': 'error',
344
+ 'n/no-exports-assign': 'error',
345
+ 'n/no-extraneous-import': 'error',
346
+ 'n/no-extraneous-require': 'error',
347
+ 'n/no-missing-import': ['error', {
348
+ allowModules: ['ava'], // Ava uses fancy new stuff, so shows up unavailable.
349
+ }],
350
+ 'n/no-missing-require': 'off', // This one doesn't work yet:
351
+ 'n/no-new-require': 'error',
352
+ 'n/no-path-concat': 'error',
353
+ 'n/no-process-exit': 'off', // No.
354
+ 'n/no-unpublished-bin': 'error',
355
+ 'n/no-unpublished-import': 'off', // Doesn't work
356
+ 'n/no-unpublished-require': 'off', // Doesn't work
357
+ 'n/no-unsupported-features/es-builtins': 'error',
358
+ 'n/no-unsupported-features/es-syntax': 'error',
359
+ 'n/no-unsupported-features/node-builtins': 'error',
360
+ 'n/process-exit-as-throw': 'error',
342
361
 
343
- // [Possible Errors](https://github.com/eslint-community/eslint-plugin-n#possible-errors)
344
- 'n/handle-callback-err': ['error', 'er'],
345
- 'n/no-callback-literal': 'error',
346
- 'n/no-exports-assign': 'error',
347
- 'n/no-extraneous-import': 'error',
348
- 'n/no-extraneous-require': 'error',
349
- 'n/no-missing-import': ['error', {
350
- allowModules: ['ava'], // Ava uses fancy new stuff, so shows up unavailable.
351
- }],
352
- 'n/no-missing-require': 'off', // This one doesn't work yet:
353
- 'n/no-new-require': 'error',
354
- 'n/no-path-concat': 'error',
355
- 'n/no-process-exit': 'off', // No.
356
- 'n/no-unpublished-bin': 'error',
357
- 'n/no-unpublished-import': 'off', // Doesn't work
358
- 'n/no-unpublished-require': 'off', // Doesn't work
359
- 'n/no-unsupported-features/es-builtins': 'error',
360
- 'n/no-unsupported-features/es-syntax': 'error',
361
- 'n/no-unsupported-features/node-builtins': 'error',
362
- 'n/process-exit-as-throw': 'error',
362
+ // [Best Practices](https://github.com/eslint-community/eslint-plugin-n#best-practices)
363
+ 'n/no-deprecated-api': 'error',
363
364
 
364
- // [Best Practices](https://github.com/eslint-community/eslint-plugin-n#best-practices)
365
- 'n/no-deprecated-api': 'error',
366
-
367
- // [Stylistic Issues](https://github.com/eslint-community/eslint-plugin-n#stylistic-issues)
368
- 'n/callback-return': 'off', // No
369
- 'n/exports-style': 'off',
370
- // Doesn't work for `import 'regenerator-runtime/runtime'`
371
- 'n/file-extension-in-import': 'error',
372
- 'n/global-require': 'off',
373
- 'n/hashbang': 'off', // Try turning this on sometime
374
- 'n/no-mixed-requires': 'error',
375
- 'n/no-process-env': 'off', // No
376
- 'n/no-restricted-import': 'off',
377
- 'n/no-restricted-require': 'off',
378
- 'n/no-sync': 'off',
379
- 'n/prefer-global/buffer': ['error', 'never'],
380
- 'n/prefer-global/console': 'off', // Hopefully only used in tests and cli
381
- 'n/prefer-global/process': 'off',
382
- 'n/prefer-global/text-decoder': ['error', 'always'],
383
- 'n/prefer-global/text-encoder': ['error', 'always'],
384
- 'n/prefer-global/url': ['error', 'always'],
385
- 'n/prefer-global/url-search-params': ['error', 'always'],
386
- 'n/prefer-node-protocol': 'error', // Turn off when needed
387
- // Not yet
388
- 'n/prefer-promises/dns': 'off',
389
- 'n/prefer-promises/fs': 'off',
390
- },
365
+ // [Stylistic Issues](https://github.com/eslint-community/eslint-plugin-n#stylistic-issues)
366
+ 'n/callback-return': 'off', // No
367
+ 'n/exports-style': 'off',
368
+ // Doesn't work for `import 'regenerator-runtime/runtime'`
369
+ 'n/file-extension-in-import': 'error',
370
+ 'n/global-require': 'off',
371
+ 'n/hashbang': 'off', // Try turning this on sometime
372
+ 'n/no-mixed-requires': 'error',
373
+ 'n/no-process-env': 'off', // No
374
+ 'n/no-restricted-import': 'off',
375
+ 'n/no-restricted-require': 'off',
376
+ 'n/no-sync': 'off',
377
+ 'n/prefer-global/buffer': ['error', 'never'],
378
+ 'n/prefer-global/console': 'off', // Hopefully only used in tests and cli
379
+ 'n/prefer-global/process': 'off',
380
+ 'n/prefer-global/text-decoder': ['error', 'always'],
381
+ 'n/prefer-global/text-encoder': ['error', 'always'],
382
+ 'n/prefer-global/url': ['error', 'always'],
383
+ 'n/prefer-global/url-search-params': ['error', 'always'],
384
+ 'n/prefer-node-protocol': 'error', // Turn off when needed
385
+ // Not yet
386
+ 'n/prefer-promises/dns': 'off',
387
+ 'n/prefer-promises/fs': 'off',
391
388
  };