@ololoepepe/eslint-config 0.0.21 → 0.1.1

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/src/rules/no.js CHANGED
@@ -1,30 +1,35 @@
1
- module.exports = {
1
+ export const rules = {
2
2
  'no-alert': 'error',
3
3
  'no-array-constructor': 'error',
4
4
  'no-async-promise-executor': 'error',
5
5
  'no-await-in-loop': 'off',
6
- 'no-bitwise': ['warn', {
7
- allow: [],
8
- int32Hint: false
9
- }],
6
+ 'no-bitwise': [
7
+ 'warn',
8
+ {
9
+ allow: [],
10
+ int32Hint: false
11
+ }
12
+ ],
10
13
  'no-caller': 'error',
11
14
  'no-case-declarations': 'error',
12
15
  'no-class-assign': 'error',
13
16
  'no-compare-neg-zero': 'error',
14
- 'no-cond-assign': ['error', 'always'],
15
- 'no-confusing-arrow': ['error', {
16
- allowParens: true,
17
- onlyOneSimpleParam: false
18
- }],
17
+ 'no-cond-assign': [
18
+ 'error',
19
+ 'always'
20
+ ],
19
21
  'no-console': 'off',
20
22
  'no-const-assign': 'error',
21
23
  'no-constant-binary-expression': 'error',
22
- 'no-constant-condition': ['error', {
23
- checkLoops: false
24
- }],
24
+ 'no-constant-condition': [
25
+ 'error',
26
+ {
27
+ checkLoops: false
28
+ }
29
+ ],
25
30
  'no-constructor-return': 'error',
26
31
  'no-continue': 'off',
27
- 'no-control-regex': 'error',
32
+ 'no-control-regex': 'off',
28
33
  'no-debugger': 'error',
29
34
  'no-delete-var': 'error',
30
35
  'no-div-regex': 'off',
@@ -33,69 +38,108 @@ module.exports = {
33
38
  'no-dupe-else-if': 'error',
34
39
  'no-dupe-keys': 'error',
35
40
  'no-duplicate-case': 'error',
36
- 'no-duplicate-imports': ['error', {
37
- includeExports: true
38
- }],
39
- 'no-else-return': ['error', {
40
- allowElseIf: true
41
- }],
42
- 'no-empty': ['error', {
43
- allowEmptyCatch: false
44
- }],
45
- 'no-empty-character-class': 'error',
46
- 'no-empty-function': ['error', {
47
- allow: []
48
- }],
41
+ 'no-duplicate-imports': [
42
+ 'error',
43
+ {
44
+ includeExports: true
45
+ }
46
+ ],
47
+ 'no-else-return': [
48
+ 'error',
49
+ {
50
+ allowElseIf: true
51
+ }
52
+ ],
53
+ 'no-empty': [
54
+ 'error',
55
+ {
56
+ allowEmptyCatch: false
57
+ }
58
+ ],
59
+ 'no-empty-character-class': 'off',
60
+ 'no-empty-function': [
61
+ 'error',
62
+ {
63
+ allow: []
64
+ }
65
+ ],
49
66
  'no-empty-pattern': 'error',
50
67
  'no-empty-static-block': 'error',
51
68
  'no-eq-null': 'error',
52
- 'no-eval': ['error', {
53
- allowIndirect: false
54
- }],
69
+ 'no-eval': [
70
+ 'error',
71
+ {
72
+ allowIndirect: false
73
+ }
74
+ ],
55
75
  'no-ex-assign': 'error',
56
- 'no-extend-native': ['error', {
57
- exceptions: []
58
- }],
76
+ 'no-extend-native': [
77
+ 'error',
78
+ {
79
+ exceptions: []
80
+ }
81
+ ],
59
82
  'no-extra-bind': 'error',
60
- 'no-extra-boolean-cast': ['error', {
61
- enforceForLogicalOperands: true
62
- }],
83
+ 'no-extra-boolean-cast': [
84
+ 'error',
85
+ {
86
+ enforceForLogicalOperands: true
87
+ }
88
+ ],
63
89
  'no-extra-label': 'error',
64
- 'no-extra-parens': 'off', // TODO: Reconsider
65
- 'no-extra-semi': 'error',
66
- 'no-fallthrough': ['error', {
67
- allowEmptyCase: false,
68
- commentPattern: 'break[\\s\\w]*omitted'
69
- }],
70
- 'no-floating-decimal': 'error',
90
+ 'no-fallthrough': [
91
+ 'error',
92
+ {
93
+ allowEmptyCase: false,
94
+ commentPattern: String.raw`break[\s\w]*omitted`
95
+ }
96
+ ],
71
97
  'no-func-assign': 'error',
72
- 'no-global-assign': ['error', {
73
- exceptions: []
74
- }],
75
- 'no-implicit-coercion': ['error', {
76
- allow: [],
77
- boolean: true,
78
- disallowTemplateShorthand: true,
79
- number: true,
80
- string: true
81
- }],
82
- 'no-implicit-globals': ['error', {
83
- lexicalBindings: false
84
- }],
98
+ 'no-global-assign': [
99
+ 'error',
100
+ {
101
+ exceptions: []
102
+ }
103
+ ],
104
+ 'no-implicit-coercion': [
105
+ 'error',
106
+ {
107
+ allow: [],
108
+ boolean: true,
109
+ disallowTemplateShorthand: true,
110
+ number: true,
111
+ string: true
112
+ }
113
+ ],
114
+ 'no-implicit-globals': [
115
+ 'error',
116
+ {
117
+ lexicalBindings: false
118
+ }
119
+ ],
85
120
  'no-implied-eval': 'error',
86
121
  'no-import-assign': 'error',
87
122
  'no-inline-comments': 'off',
88
- 'no-inner-declarations': ['error', 'both'],
89
- 'no-invalid-regexp': ['error'],
90
- 'no-invalid-this': ['error', {
91
- capIsConstructor: true
92
- }],
93
- 'no-irregular-whitespace': ['error', {
94
- skipComments: true,
95
- skipRegExps: true,
96
- skipStrings: true,
97
- skipTemplates: true
98
- }],
123
+ 'no-inner-declarations': [
124
+ 'error',
125
+ 'both'
126
+ ],
127
+ 'no-invalid-regexp': 'off',
128
+ 'no-invalid-this': [
129
+ 'error',
130
+ {
131
+ capIsConstructor: true
132
+ }
133
+ ],
134
+ 'no-irregular-whitespace': [
135
+ 'error',
136
+ {
137
+ skipComments: true,
138
+ skipRegExps: true,
139
+ skipStrings: true,
140
+ skipTemplates: true
141
+ }
142
+ ],
99
143
  'no-iterator': 'error',
100
144
  'no-label-var': 'error',
101
145
  'no-labels': 'off',
@@ -105,31 +149,18 @@ module.exports = {
105
149
  'no-loss-of-precision': 'error',
106
150
  'no-magic-numbers': 'off',
107
151
  'no-misleading-character-class': 'error',
108
- 'no-mixed-operators': ['error', {
109
- allowSamePrecedence: true
110
- }],
111
- 'no-mixed-spaces-and-tabs': 'error',
112
- 'no-multi-assign': ['error', {
113
- ignoreNonDeclaration: false
114
- }],
115
- 'no-multi-spaces': ['error', {
116
- exceptions: {
117
- Property: false
118
- }
119
- }],
152
+ 'no-multi-assign': [
153
+ 'error',
154
+ {
155
+ ignoreNonDeclaration: false
156
+ }
157
+ ],
120
158
  'no-multi-str': 'error',
121
- 'no-multiple-empty-lines': ['error', {
122
- max: 1,
123
- maxBOF: 0,
124
- maxEOF: 1
125
- }],
126
159
  'no-negated-condition': 'error',
127
160
  'no-nested-ternary': 'off',
128
161
  'no-new': 'error',
129
162
  'no-new-func': 'error',
130
163
  'no-new-native-nonconstructor': 'error',
131
- 'no-new-object': 'error',
132
- 'no-new-symbol': 'error',
133
164
  'no-new-wrappers': 'error',
134
165
  'no-nonoctal-decimal-escape': 'error',
135
166
  'no-obj-calls': 'error',
@@ -141,108 +172,156 @@ module.exports = {
141
172
  'no-promise-executor-return': 'error',
142
173
  'no-proto': 'error',
143
174
  'no-prototype-builtins': 'error',
144
- 'no-redeclare': ['error', {
145
- builtinGlobals: true
146
- }],
175
+ 'no-redeclare': [
176
+ 'error',
177
+ {
178
+ builtinGlobals: true
179
+ }
180
+ ],
147
181
  'no-regex-spaces': 'error',
148
182
  'no-restricted-exports': 'off',
149
183
  'no-restricted-globals': 'off',
150
184
  'no-restricted-imports': 'off',
151
185
  'no-restricted-properties': 'off',
152
186
  'no-restricted-syntax': 'off',
153
- 'no-return-assign': ['error', 'always'],
154
- 'no-return-await': 'off',
187
+ 'no-return-assign': [
188
+ 'error',
189
+ 'always'
190
+ ],
155
191
  'no-script-url': 'error',
156
- 'no-self-assign': ['error', {
157
- props: true
158
- }],
192
+ 'no-self-assign': [
193
+ 'error',
194
+ {
195
+ props: true
196
+ }
197
+ ],
159
198
  'no-self-compare': 'error',
160
- 'no-sequences': ['error', {
161
- allowInParentheses: false
162
- }],
199
+ 'no-sequences': [
200
+ 'error',
201
+ {
202
+ allowInParentheses: false
203
+ }
204
+ ],
163
205
  'no-setter-return': 'error',
164
- 'no-shadow': ['error', {
165
- builtinGlobals: false,
166
- hoist: 'functions',
167
- ignoreOnInitialization: false
168
- }],
206
+ 'no-shadow': [
207
+ 'error',
208
+ {
209
+ builtinGlobals: false,
210
+ hoist: 'functions',
211
+ ignoreOnInitialization: false
212
+ }
213
+ ],
169
214
  'no-shadow-restricted-names': 'error',
170
215
  'no-sparse-arrays': 'error',
171
- 'no-tabs': ['error', {
172
- allowIndentationTabs: false
173
- }],
174
216
  'no-template-curly-in-string': 'warn',
175
217
  'no-ternary': 'off',
176
218
  'no-this-before-super': 'error',
177
219
  'no-throw-literal': 'error',
178
- 'no-trailing-spaces': ['error', {
179
- ignoreComments: false,
180
- skipBlankLines: false
181
- }],
182
- 'no-undef': ['error', {
183
- typeof: true
184
- }],
220
+ 'no-unassigned-vars': 'error',
221
+ 'no-undef': [
222
+ 'error',
223
+ {
224
+ typeof: true
225
+ }
226
+ ],
185
227
  'no-undef-init': 'error',
186
228
  'no-undefined': 'off',
187
229
  'no-underscore-dangle': 'off',
188
230
  'no-unexpected-multiline': 'error',
189
231
  'no-unmodified-loop-condition': 'warn',
190
- 'no-unneeded-ternary': ['error', {
191
- defaultAssignment: false
192
- }],
232
+ 'no-unneeded-ternary': [
233
+ 'error',
234
+ {
235
+ defaultAssignment: false
236
+ }
237
+ ],
193
238
  'no-unreachable': 'error',
194
- 'no-unreachable-loop': ['error', {
195
- ignore: []
196
- }],
239
+ 'no-unreachable-loop': [
240
+ 'error',
241
+ {
242
+ ignore: []
243
+ }
244
+ ],
197
245
  'no-unsafe-finally': 'error',
198
- 'no-unsafe-negation': ['error', {
199
- enforceForOrderingRelations: true
200
- }],
201
- 'no-unsafe-optional-chaining': ['error', {
202
- disallowArithmeticOperators: true
203
- }],
204
- 'no-unused-expressions': ['error', {
205
- allowShortCircuit: false,
206
- allowTaggedTemplates: false,
207
- allowTernary: false,
208
- enforceForJSX: true
209
- }],
246
+ 'no-unsafe-negation': [
247
+ 'error',
248
+ {
249
+ enforceForOrderingRelations: true
250
+ }
251
+ ],
252
+ 'no-unsafe-optional-chaining': [
253
+ 'error',
254
+ {
255
+ disallowArithmeticOperators: true
256
+ }
257
+ ],
258
+ 'no-unused-expressions': [
259
+ 'error',
260
+ {
261
+ allowShortCircuit: false,
262
+ allowTaggedTemplates: false,
263
+ allowTernary: false,
264
+ enforceForJSX: true
265
+ }
266
+ ],
210
267
  'no-unused-labels': 'error',
211
268
  'no-unused-private-class-members': 'error',
212
- 'no-unused-vars': ['warn', {
213
- args: 'after-used',
214
- caughtErrors: 'all',
215
- ignoreRestSiblings: true,
216
- vars: 'all'
217
- }],
218
- 'no-use-before-define': ['error', {
219
- classes: true,
220
- functions: false,
221
- variables: true
222
- }],
223
- 'no-useless-backreference': 'error',
269
+ 'no-unused-vars': [
270
+ 'warn',
271
+ {
272
+ args: 'after-used',
273
+ caughtErrors: 'all',
274
+ ignoreRestSiblings: true,
275
+ vars: 'all'
276
+ }
277
+ ],
278
+ 'no-use-before-define': [
279
+ 'error',
280
+ {
281
+ classes: true,
282
+ functions: false,
283
+ variables: true
284
+ }
285
+ ],
286
+ 'no-useless-assignment': 'error',
287
+ 'no-useless-backreference': 'off',
224
288
  'no-useless-call': 'error',
225
289
  'no-useless-catch': 'error',
226
- 'no-useless-computed-key': ['error', {
227
- enforceForClassMembers: true
228
- }],
290
+ 'no-useless-computed-key': [
291
+ 'error',
292
+ {
293
+ enforceForClassMembers: true
294
+ }
295
+ ],
229
296
  'no-useless-concat': 'error',
230
297
  'no-useless-constructor': 'error',
231
298
  'no-useless-escape': 'error',
232
- 'no-useless-rename': ['error', {
233
- ignoreDestructuring: false,
234
- ignoreExport: false,
235
- ignoreImport: false
236
- }],
299
+ 'no-useless-rename': [
300
+ 'error',
301
+ {
302
+ ignoreDestructuring: false,
303
+ ignoreExport: false,
304
+ ignoreImport: false
305
+ }
306
+ ],
237
307
  'no-useless-return': 'error',
238
308
  'no-var': 'error',
239
- 'no-void': ['error', {
240
- allowAsStatement: false
241
- }],
242
- 'no-warning-comments': ['warn', {
243
- location: 'start',
244
- terms: ['fix', 'fixme', 'todo']
245
- }],
246
- 'no-whitespace-before-property': 'error',
309
+ 'no-void': [
310
+ 'error',
311
+ {
312
+ allowAsStatement: false
313
+ }
314
+ ],
315
+ 'no-warning-comments': [
316
+ 'warn',
317
+ {
318
+ location: 'start',
319
+ terms: [
320
+ 'fix',
321
+ 'fixme',
322
+ 'todo'
323
+ ]
324
+ }
325
+ ],
247
326
  'no-with': 'error'
248
327
  };
@@ -1,107 +0,0 @@
1
- module.exports = {
2
- rules: {
3
- 'import/consistent-type-specifier-style': 'off', // TODO: Reconsider if use TS/Flow
4
- 'import/default': 'error',
5
- 'import/dynamic-import-chunkname': ['error'],
6
- 'import/export': 'error',
7
- 'import/exports-last': 'off',
8
- 'import/extensions': 'off',
9
- 'import/first': ['error', 'absolute-first'],
10
- 'import/group-exports': 'off',
11
- 'import/max-dependencies': 'off',
12
- 'import/named': 'error',
13
- 'import/namespace': ['error', {
14
- allowComputed: false
15
- }],
16
- 'import/newline-after-import': ['error', {
17
- considerComments: false,
18
- count: 1
19
- }],
20
- 'import/no-absolute-path': ['error', {
21
- amd: true,
22
- commonjs: true,
23
- esmodule: true
24
- }],
25
- 'import/no-amd': 'off',
26
- 'import/no-anonymous-default-export': 'off',
27
- 'import/no-commonjs': 'off',
28
- 'import/no-cycle': ['error', {
29
- amd: true,
30
- commonjs: true,
31
- esmodule: true, // TODO
32
- ignoreExternal: true
33
- }],
34
- 'import/no-default-export': 'off',
35
- 'import/no-deprecated': 'warn',
36
- 'import/no-duplicates': ['error', {
37
- considerQueryString: true
38
- }],
39
- 'import/no-dynamic-require': 'off', // TODO
40
- 'import/no-empty-named-blocks': 'error',
41
- 'import/no-extraneous-dependencies': 'error',
42
- 'import/no-import-module-exports': 'off',
43
- 'import/no-internal-modules': 'off',
44
- 'import/no-mutable-exports': 'error',
45
- 'import/no-named-as-default': 'warn',
46
- 'import/no-named-as-default-member': 'error',
47
- 'import/no-named-default': 'off',
48
- 'import/no-named-export': 'off',
49
- 'import/no-namespace': 'off',
50
- 'import/no-nodejs-modules': 'off',
51
- 'import/no-relative-packages': 'off',
52
- 'import/no-relative-parent-imports': 'warn',
53
- 'import/no-restricted-paths': 'off',
54
- 'import/no-self-import': 'error',
55
- 'import/no-unassigned-import': 'off',
56
- 'import/no-unresolved': ['error', {
57
- ignore: ['^#']
58
- }],
59
- 'import/no-unused-modules': 'off', // TODO: Reconsider
60
- 'import/no-useless-path-segments': ['error', {
61
- commonjs: true,
62
- noUselessIndex: false
63
- }],
64
- 'import/no-webpack-loader-syntax': 'error',
65
- 'import/order': ['error', {
66
- alphabetize: {
67
- caseInsensitive: true,
68
- order: 'asc',
69
- orderImportKind: 'ignore'
70
- },
71
- distinctGroup: true,
72
- groups: ['builtin', 'external', 'type', 'internal', 'parent', 'sibling', 'index', 'object', 'unknown'],
73
- 'newlines-between': 'always-and-inside-groups',
74
- pathGroups: [{
75
- group: 'internal',
76
- pattern: '#src/**'
77
- }, {
78
- group: 'parent',
79
- pattern: '../**/styles.js',
80
- position: 'after'
81
- }, {
82
- group: 'parent',
83
- pattern: '../**/styles.css',
84
- position: 'after'
85
- }, {
86
- group: 'parent',
87
- pattern: '../**/styles.less',
88
- position: 'after'
89
- }, {
90
- group: 'sibling',
91
- pattern: './**/styles.js',
92
- position: 'after'
93
- }, {
94
- group: 'sibling',
95
- pattern: './**/styles.css',
96
- position: 'after'
97
- }, {
98
- group: 'sibling',
99
- pattern: './**/styles.less',
100
- position: 'after'
101
- }],
102
- warnOnUnassignedImports: false
103
- }],
104
- 'import/prefer-default-export': 'off',
105
- 'import/unambiguous': 'off' // TODO: Reconsider
106
- }
107
- };