@innovixx/eslint-config 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.
@@ -0,0 +1,525 @@
1
+ module.exports = {
2
+ rules: {
3
+ // enforce line breaks after opening and before closing array brackets
4
+ // https://eslint.org/docs/rules/array-bracket-newline
5
+ // TODO: enable? semver-major
6
+ 'array-bracket-newline': ['off', 'consistent'], // object option alternative: { multiline: true, minItems: 3 }
7
+
8
+ // enforce line breaks between array elements
9
+ // https://eslint.org/docs/rules/array-element-newline
10
+ // TODO: enable? semver-major
11
+ 'array-element-newline': ['off', { multiline: true, minItems: 3 }],
12
+
13
+ // enforce spacing inside array brackets
14
+ 'array-bracket-spacing': ['error', 'never'],
15
+
16
+ // enforce spacing inside single-line blocks
17
+ // https://eslint.org/docs/rules/block-spacing
18
+ 'block-spacing': ['error', 'always'],
19
+
20
+ // enforce one true brace style
21
+ 'brace-style': ['error', '1tbs', { allowSingleLine: true }],
22
+
23
+ // require camel case names
24
+ camelcase: ['error', { properties: 'never', ignoreDestructuring: false }],
25
+
26
+ // enforce or disallow capitalization of the first letter of a comment
27
+ // https://eslint.org/docs/rules/capitalized-comments
28
+ 'capitalized-comments': ['off', 'never', {
29
+ line: {
30
+ ignorePattern: '.*',
31
+ ignoreInlineComments: true,
32
+ ignoreConsecutiveComments: true,
33
+ },
34
+ block: {
35
+ ignorePattern: '.*',
36
+ ignoreInlineComments: true,
37
+ ignoreConsecutiveComments: true,
38
+ },
39
+ }],
40
+
41
+ // require trailing commas in multiline object literals
42
+ 'comma-dangle': ['error', {
43
+ arrays: 'always-multiline',
44
+ objects: 'always-multiline',
45
+ imports: 'always-multiline',
46
+ exports: 'always-multiline',
47
+ functions: 'always-multiline',
48
+ }],
49
+
50
+ // enforce spacing before and after comma
51
+ 'comma-spacing': ['error', { before: false, after: true }],
52
+
53
+ // enforce one true comma style
54
+ 'comma-style': ['error', 'last', {
55
+ exceptions: {
56
+ ArrayExpression: false,
57
+ ArrayPattern: false,
58
+ ArrowFunctionExpression: false,
59
+ CallExpression: false,
60
+ FunctionDeclaration: false,
61
+ FunctionExpression: false,
62
+ ImportDeclaration: false,
63
+ ObjectExpression: false,
64
+ ObjectPattern: false,
65
+ VariableDeclaration: false,
66
+ NewExpression: false,
67
+ },
68
+ }],
69
+
70
+ // disallow padding inside computed properties
71
+ 'computed-property-spacing': ['error', 'never'],
72
+
73
+ // enforces consistent naming when capturing the current execution context
74
+ 'consistent-this': 'off',
75
+
76
+ // enforce newline at the end of file, with no multiple empty lines
77
+ 'eol-last': ['error', 'always'],
78
+
79
+ // https://eslint.org/docs/rules/function-call-argument-newline
80
+ // TODO: enable, semver-minor, once eslint v6.2 is required (which is a major)
81
+ 'function-call-argument-newline': ['off', 'consistent'],
82
+
83
+ // enforce spacing between functions and their invocations
84
+ // https://eslint.org/docs/rules/func-call-spacing
85
+ 'func-call-spacing': ['error', 'never'],
86
+
87
+ // requires function names to match the name of the variable or property to which they are
88
+ // assigned
89
+ // https://eslint.org/docs/rules/func-name-matching
90
+ 'func-name-matching': ['off', 'always', {
91
+ includeCommonJSModuleExports: false,
92
+ considerPropertyDescriptor: true,
93
+ }],
94
+
95
+ // require function expressions to have a name
96
+ // https://eslint.org/docs/rules/func-names
97
+ 'func-names': 'warn',
98
+
99
+ // enforces use of function declarations or expressions
100
+ // https://eslint.org/docs/rules/func-style
101
+ // TODO: enable
102
+ 'func-style': ['off', 'expression'],
103
+
104
+ // enforce consistent line breaks inside function parentheses
105
+ // https://eslint.org/docs/rules/function-paren-newline
106
+ 'function-paren-newline': ['error', 'consistent'],
107
+
108
+ // Blacklist certain identifiers to prevent them being used
109
+ // https://eslint.org/docs/rules/id-blacklist
110
+ 'id-blacklist': 'off',
111
+
112
+ // this option enforces minimum and maximum identifier lengths
113
+ // (variable names, property names etc.)
114
+ 'id-length': 'off',
115
+
116
+ // require identifiers to match the provided regular expression
117
+ 'id-match': 'off',
118
+
119
+ // Enforce the location of arrow function bodies with implicit returns
120
+ // https://eslint.org/docs/rules/implicit-arrow-linebreak
121
+ 'implicit-arrow-linebreak': ['error', 'beside'],
122
+
123
+ // this option sets a specific tab width for your code
124
+ // https://eslint.org/docs/rules/indent
125
+ indent: ['error', 2, {
126
+ SwitchCase: 1,
127
+ VariableDeclarator: 1,
128
+ outerIIFEBody: 1,
129
+ // MemberExpression: null,
130
+ FunctionDeclaration: {
131
+ parameters: 1,
132
+ body: 1,
133
+ },
134
+ FunctionExpression: {
135
+ parameters: 1,
136
+ body: 1,
137
+ },
138
+ CallExpression: {
139
+ arguments: 1,
140
+ },
141
+ ArrayExpression: 1,
142
+ ObjectExpression: 1,
143
+ ImportDeclaration: 1,
144
+ flatTernaryExpressions: false,
145
+ // list derived from https://github.com/benjamn/ast-types/blob/HEAD/def/jsx.js
146
+ ignoredNodes: ['JSXElement', 'JSXElement > *', 'JSXAttribute', 'JSXIdentifier', 'JSXNamespacedName', 'JSXMemberExpression', 'JSXSpreadAttribute', 'JSXExpressionContainer', 'JSXOpeningElement', 'JSXClosingElement', 'JSXText', 'JSXEmptyExpression', 'JSXSpreadChild'],
147
+ ignoreComments: false,
148
+ }],
149
+
150
+ // specify whether double or single quotes should be used in JSX attributes
151
+ // https://eslint.org/docs/rules/jsx-quotes
152
+ 'jsx-quotes': ['off', 'prefer-double'],
153
+
154
+ // enforces spacing between keys and values in object literal properties
155
+ 'key-spacing': ['error', { beforeColon: false, afterColon: true }],
156
+
157
+ // require a space before & after certain keywords
158
+ 'keyword-spacing': ['error', {
159
+ before: true,
160
+ after: true,
161
+ overrides: {
162
+ return: { after: true },
163
+ throw: { after: true },
164
+ case: { after: true },
165
+ },
166
+ }],
167
+
168
+ // enforce position of line comments
169
+ // https://eslint.org/docs/rules/line-comment-position
170
+ // TODO: enable?
171
+ 'line-comment-position': ['off', {
172
+ position: 'above',
173
+ ignorePattern: '',
174
+ applyDefaultPatterns: true,
175
+ }],
176
+
177
+ // disallow mixed 'LF' and 'CRLF' as linebreaks
178
+ // https://eslint.org/docs/rules/linebreak-style
179
+ 'linebreak-style': ['error', 'unix'],
180
+
181
+ // require or disallow an empty line between class members
182
+ // https://eslint.org/docs/rules/lines-between-class-members
183
+ 'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: false }],
184
+
185
+ // enforces empty lines around comments
186
+ 'lines-around-comment': 'off',
187
+
188
+ // require or disallow newlines around directives
189
+ // https://eslint.org/docs/rules/lines-around-directive
190
+ 'lines-around-directive': ['error', {
191
+ before: 'always',
192
+ after: 'always',
193
+ }],
194
+
195
+ // specify the maximum depth that blocks can be nested
196
+ 'max-depth': ['off', 4],
197
+
198
+ // specify the maximum length of a line in your program
199
+ // https://eslint.org/docs/rules/max-len
200
+ 'max-len': ['off'],
201
+
202
+ // specify the max number of lines in a file
203
+ // https://eslint.org/docs/rules/max-lines
204
+ 'max-lines': ['off', {
205
+ max: 300,
206
+ skipBlankLines: true,
207
+ skipComments: true,
208
+ }],
209
+
210
+ // enforce a maximum function length
211
+ // https://eslint.org/docs/rules/max-lines-per-function
212
+ 'max-lines-per-function': ['off', {
213
+ max: 50,
214
+ skipBlankLines: true,
215
+ skipComments: true,
216
+ IIFEs: true,
217
+ }],
218
+
219
+ // specify the maximum depth callbacks can be nested
220
+ 'max-nested-callbacks': 'off',
221
+
222
+ // limits the number of parameters that can be used in the function declaration.
223
+ 'max-params': ['off', 3],
224
+
225
+ // specify the maximum number of statement allowed in a function
226
+ 'max-statements': ['off', 10],
227
+
228
+ // restrict the number of statements per line
229
+ // https://eslint.org/docs/rules/max-statements-per-line
230
+ 'max-statements-per-line': ['off', { max: 1 }],
231
+
232
+ // enforce a particular style for multiline comments
233
+ // https://eslint.org/docs/rules/multiline-comment-style
234
+ 'multiline-comment-style': ['off', 'starred-block'],
235
+
236
+ // require multiline ternary
237
+ // https://eslint.org/docs/rules/multiline-ternary
238
+ // TODO: enable?
239
+ 'multiline-ternary': ['off', 'never'],
240
+
241
+ // require a capital letter for constructors
242
+ 'new-cap': ['error', {
243
+ newIsCap: true,
244
+ newIsCapExceptions: [],
245
+ capIsNew: false,
246
+ capIsNewExceptions: ['Immutable.Map', 'Immutable.Set', 'Immutable.List'],
247
+ }],
248
+
249
+ // disallow the omission of parentheses when invoking a constructor with no arguments
250
+ // https://eslint.org/docs/rules/new-parens
251
+ 'new-parens': 'error',
252
+
253
+ // allow/disallow an empty newline after var statement
254
+ 'newline-after-var': 'off',
255
+
256
+ // https://eslint.org/docs/rules/newline-before-return
257
+ 'newline-before-return': 'off',
258
+
259
+ // enforces new line after each method call in the chain to make it
260
+ // more readable and easy to maintain
261
+ // https://eslint.org/docs/rules/newline-per-chained-call
262
+ 'newline-per-chained-call': ['error', { ignoreChainWithDepth: 4 }],
263
+
264
+ // disallow use of the Array constructor
265
+ 'no-array-constructor': 'error',
266
+
267
+ // disallow use of bitwise operators
268
+ // https://eslint.org/docs/rules/no-bitwise
269
+ 'no-bitwise': 'error',
270
+
271
+ // disallow use of the continue statement
272
+ // https://eslint.org/docs/rules/no-continue
273
+ 'no-continue': 'error',
274
+
275
+ // disallow comments inline after code
276
+ 'no-inline-comments': 'off',
277
+
278
+ // disallow if as the only statement in an else block
279
+ // https://eslint.org/docs/rules/no-lonely-if
280
+ 'no-lonely-if': 'error',
281
+
282
+ // disallow un-paren'd mixes of different operators
283
+ // https://eslint.org/docs/rules/no-mixed-operators
284
+ 'no-mixed-operators': ['error', {
285
+ // the list of arthmetic groups disallows mixing `%` and `**`
286
+ // with other arithmetic operators.
287
+ groups: [
288
+ ['%', '**'],
289
+ ['%', '+'],
290
+ ['%', '-'],
291
+ ['%', '*'],
292
+ ['%', '/'],
293
+ ['/', '*'],
294
+ ['&', '|', '<<', '>>', '>>>'],
295
+ ['==', '!=', '===', '!=='],
296
+ ['&&', '||'],
297
+ ],
298
+ allowSamePrecedence: false,
299
+ }],
300
+
301
+ // disallow mixed spaces and tabs for indentation
302
+ 'no-mixed-spaces-and-tabs': 'error',
303
+
304
+ // disallow use of chained assignment expressions
305
+ // https://eslint.org/docs/rules/no-multi-assign
306
+ 'no-multi-assign': ['error'],
307
+
308
+ // disallow multiple empty lines, only one newline at the end, and no new lines at the beginning
309
+ // https://eslint.org/docs/rules/no-multiple-empty-lines
310
+ 'no-multiple-empty-lines': ['error', { max: 2, maxBOF: 1, maxEOF: 0 }],
311
+
312
+ // disallow negated conditions
313
+ // https://eslint.org/docs/rules/no-negated-condition
314
+ 'no-negated-condition': 'off',
315
+
316
+ // disallow nested ternary expressions
317
+ 'no-nested-ternary': 'error',
318
+
319
+ // disallow use of the Object constructor
320
+ 'no-new-object': 'error',
321
+
322
+ // disallow use of unary operators, ++ and --
323
+ // https://eslint.org/docs/rules/no-plusplus
324
+ 'no-plusplus': 'error',
325
+
326
+ // disallow certain syntax forms
327
+ // https://eslint.org/docs/rules/no-restricted-syntax
328
+ 'no-restricted-syntax': [
329
+ 'error',
330
+ {
331
+ selector: 'ForInStatement',
332
+ message: 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
333
+ },
334
+ {
335
+ selector: 'ForOfStatement',
336
+ message: 'iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.',
337
+ },
338
+ {
339
+ selector: 'LabeledStatement',
340
+ message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
341
+ },
342
+ {
343
+ selector: 'WithStatement',
344
+ message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
345
+ },
346
+ ],
347
+
348
+ // disallow space between function identifier and application
349
+ 'no-spaced-func': 'error',
350
+
351
+ // disallow tab characters entirely
352
+ 'no-tabs': 'error',
353
+
354
+ // disallow the use of ternary operators
355
+ 'no-ternary': 'off',
356
+
357
+ // disallow trailing whitespace at the end of lines
358
+ 'no-trailing-spaces': ['error', {
359
+ skipBlankLines: false,
360
+ ignoreComments: false,
361
+ }],
362
+
363
+ // disallow dangling underscores in identifiers
364
+ // https://eslint.org/docs/rules/no-underscore-dangle
365
+ 'no-underscore-dangle': ['error', {
366
+ allow: [],
367
+ allowAfterThis: false,
368
+ allowAfterSuper: false,
369
+ enforceInMethodNames: true,
370
+ }],
371
+
372
+ // disallow the use of Boolean literals in conditional expressions
373
+ // also, prefer `a || b` over `a ? a : b`
374
+ // https://eslint.org/docs/rules/no-unneeded-ternary
375
+ 'no-unneeded-ternary': ['error', { defaultAssignment: false }],
376
+
377
+ // disallow whitespace before properties
378
+ // https://eslint.org/docs/rules/no-whitespace-before-property
379
+ 'no-whitespace-before-property': 'error',
380
+
381
+ // enforce the location of single-line statements
382
+ // https://eslint.org/docs/rules/nonblock-statement-body-position
383
+ 'nonblock-statement-body-position': ['error', 'beside', { overrides: {} }],
384
+
385
+ // require padding inside curly braces
386
+ 'object-curly-spacing': ['error', 'always'],
387
+
388
+ // enforce line breaks between braces
389
+ // https://eslint.org/docs/rules/object-curly-newline
390
+ 'object-curly-newline': ['error', {
391
+ ObjectExpression: { multiline: true, consistent: true },
392
+ ObjectPattern: { multiline: true, consistent: true },
393
+ ImportDeclaration: { multiline: true, consistent: true },
394
+ ExportDeclaration: { multiline: true, consistent: true },
395
+ }],
396
+
397
+ // enforce "same line" or "multiple line" on object properties.
398
+ // https://eslint.org/docs/rules/object-property-newline
399
+ 'object-property-newline': ['error', {
400
+ allowAllPropertiesOnSameLine: true,
401
+ }],
402
+
403
+ // allow just one var statement per function
404
+ 'one-var': ['error', 'never'],
405
+
406
+ // require a newline around variable declaration
407
+ // https://eslint.org/docs/rules/one-var-declaration-per-line
408
+ 'one-var-declaration-per-line': ['error', 'always'],
409
+
410
+ // require assignment operator shorthand where possible or prohibit it entirely
411
+ // https://eslint.org/docs/rules/operator-assignment
412
+ 'operator-assignment': ['error', 'always'],
413
+
414
+ // Requires operator at the beginning of the line in multiline statements
415
+ // https://eslint.org/docs/rules/operator-linebreak
416
+ 'operator-linebreak': ['error', 'before', { overrides: { '=': 'none' } }],
417
+
418
+ // disallow padding within blocks
419
+ 'padded-blocks': ['error',
420
+ {
421
+ blocks: 'never',
422
+ classes: 'never',
423
+ switches: 'never',
424
+ },
425
+ {
426
+ allowSingleLineBlocks: true,
427
+ },
428
+ ],
429
+
430
+ // Require or disallow padding lines between statements
431
+ // https://eslint.org/docs/rules/padding-line-between-statements
432
+ 'padding-line-between-statements': 'off',
433
+
434
+ // Disallow the use of Math.pow in favor of the ** operator
435
+ // https://eslint.org/docs/rules/prefer-exponentiation-operator
436
+ // TODO: enable, semver-major when eslint 5 is dropped
437
+ 'prefer-exponentiation-operator': 'off',
438
+
439
+ // Prefer use of an object spread over Object.assign
440
+ // https://eslint.org/docs/rules/prefer-object-spread
441
+ 'prefer-object-spread': 'error',
442
+
443
+ // require quotes around object literal property names
444
+ // https://eslint.org/docs/rules/quote-props.html
445
+ 'quote-props': ['error', 'as-needed', { keywords: false, unnecessary: true, numbers: false }],
446
+
447
+ // specify whether double or single quotes should be used
448
+ quotes: ['error', 'single', { avoidEscape: true }],
449
+
450
+ // do not require jsdoc
451
+ // https://eslint.org/docs/rules/require-jsdoc
452
+ 'require-jsdoc': 'off',
453
+
454
+ // require or disallow use of semicolons instead of ASI
455
+ semi: ['error', 'always'],
456
+
457
+ // enforce spacing before and after semicolons
458
+ 'semi-spacing': ['error', { before: false, after: true }],
459
+
460
+ // Enforce location of semicolons
461
+ // https://eslint.org/docs/rules/semi-style
462
+ 'semi-style': ['error', 'last'],
463
+
464
+ // requires object keys to be sorted
465
+ 'sort-keys': ['off', 'asc', { caseSensitive: false, natural: true }],
466
+
467
+ // sort variables within the same declaration block
468
+ 'sort-vars': 'off',
469
+
470
+ // require or disallow space before blocks
471
+ 'space-before-blocks': 'error',
472
+
473
+ // require or disallow space before function opening parenthesis
474
+ // https://eslint.org/docs/rules/space-before-function-paren
475
+ 'space-before-function-paren': ['error', {
476
+ anonymous: 'always',
477
+ named: 'never',
478
+ asyncArrow: 'always',
479
+ }],
480
+
481
+ // require or disallow spaces inside parentheses
482
+ 'space-in-parens': ['error', 'never'],
483
+
484
+ // require spaces around operators
485
+ 'space-infix-ops': 'error',
486
+
487
+ // Require or disallow spaces before/after unary operators
488
+ // https://eslint.org/docs/rules/space-unary-ops
489
+ 'space-unary-ops': ['error', {
490
+ words: true,
491
+ nonwords: false,
492
+ overrides: {
493
+ },
494
+ }],
495
+
496
+ // require or disallow a space immediately following the // or /* in a comment
497
+ // https://eslint.org/docs/rules/spaced-comment
498
+ 'spaced-comment': ['error', 'always', {
499
+ line: {
500
+ exceptions: ['-', '+'],
501
+ markers: ['=', '!'], // space here to support sprockets directives
502
+ },
503
+ block: {
504
+ exceptions: ['-', '+'],
505
+ markers: ['=', '!', ':', '::'], // space here to support sprockets directives and flow comment types
506
+ balanced: true,
507
+ },
508
+ }],
509
+
510
+ // Enforce spacing around colons of switch statements
511
+ // https://eslint.org/docs/rules/switch-colon-spacing
512
+ 'switch-colon-spacing': ['error', { after: true, before: false }],
513
+
514
+ // Require or disallow spacing between template tags and their literals
515
+ // https://eslint.org/docs/rules/template-tag-spacing
516
+ 'template-tag-spacing': ['error', 'never'],
517
+
518
+ // require or disallow the Unicode Byte Order Mark
519
+ // https://eslint.org/docs/rules/unicode-bom
520
+ 'unicode-bom': ['error', 'never'],
521
+
522
+ // require regex literals to be wrapped in parentheses
523
+ 'wrap-regex': 'off',
524
+ },
525
+ };
@@ -0,0 +1,44 @@
1
+ const confusingBrowserGlobals = require('confusing-browser-globals');
2
+
3
+ module.exports = {
4
+ rules: {
5
+ // enforce or disallow variable initializations at definition
6
+ 'init-declarations': 'off',
7
+
8
+ // disallow the catch clause parameter name being the same as a variable in the outer scope
9
+ 'no-catch-shadow': 'off',
10
+
11
+ // disallow deletion of variables
12
+ 'no-delete-var': 'error',
13
+
14
+ // disallow labels that share a name with a variable
15
+ // https://eslint.org/docs/rules/no-label-var
16
+ 'no-label-var': 'error',
17
+
18
+ // disallow specific globals
19
+ 'no-restricted-globals': ['error', 'isFinite', 'isNaN'].concat(confusingBrowserGlobals),
20
+
21
+ // disallow declaration of variables already declared in the outer scope
22
+ 'no-shadow': 'error',
23
+
24
+ // disallow shadowing of names such as arguments
25
+ 'no-shadow-restricted-names': 'error',
26
+
27
+ // disallow use of undeclared variables unless mentioned in a /*global */ block
28
+ 'no-undef': 'error',
29
+
30
+ // disallow use of undefined when initializing variables
31
+ 'no-undef-init': 'error',
32
+
33
+ // disallow use of undefined variable
34
+ // https://eslint.org/docs/rules/no-undefined
35
+ // TODO: enable?
36
+ 'no-undefined': 'off',
37
+
38
+ // disallow declaration of variables that are not used in the code
39
+ 'no-unused-vars': ['error', { vars: 'all', args: 'after-used', ignoreRestSiblings: true }],
40
+
41
+ // disallow use of variables before they are defined
42
+ 'no-use-before-define': ['error', { functions: true, classes: true, variables: true }],
43
+ },
44
+ };
@@ -0,0 +1,8 @@
1
+ module.exports = {
2
+ extends: [
3
+ './base',
4
+ './jest',
5
+ './react',
6
+ ].map(require.resolve),
7
+ rules: {},
8
+ };
@@ -0,0 +1,14 @@
1
+ module.exports = {
2
+ env: {
3
+ jest: true,
4
+ },
5
+ plugins: [
6
+ 'jest',
7
+ 'jest-dom',
8
+ ],
9
+ extends: [
10
+ './rules/jest',
11
+ './rules/jest-dom',
12
+ ].map(require.resolve),
13
+ rules: {},
14
+ };
@@ -0,0 +1,9 @@
1
+ module.exports = {
2
+ rules: {
3
+ 'jest-dom/prefer-checked': 'error',
4
+ 'jest-dom/prefer-enabled-disabled': 'error',
5
+ 'jest-dom/prefer-focus': 'error',
6
+ 'jest-dom/prefer-required': 'error',
7
+ 'jest-dom/prefer-to-have-attribute': 'error',
8
+ },
9
+ };
@@ -0,0 +1,44 @@
1
+ module.exports = {
2
+ rules: {
3
+ 'jest/consistent-test-it': ['error', { fn: 'it' }],
4
+ 'jest/expect-expect': 'error',
5
+ 'jest/lowercase-name': ['error', { ignore: ['describe'] }],
6
+ 'jest/no-alias-methods': 'error',
7
+ 'jest/no-commented-out-tests': 'off',
8
+ 'jest/no-disabled-tests': 'off',
9
+ 'jest/no-duplicate-hooks': 'error',
10
+ 'jest/no-expect-resolves': 'error',
11
+ 'jest/no-export': 'error',
12
+ 'jest/no-focused-tests': 'error',
13
+ 'jest/no-hooks': 'off',
14
+ 'jest/no-identical-title': 'error',
15
+ 'jest/no-if': 'error',
16
+ 'jest/no-jasmine-globals': 'error',
17
+ 'jest/no-jest-import': 'error',
18
+ 'jest/no-large-snapshots': 'error',
19
+ 'jest/no-mocks-import': 'error',
20
+ 'jest/no-standalone-expect': 'error',
21
+ 'jest/no-done-callback': 'error',
22
+ 'jest/no-test-prefixes': 'error',
23
+ 'jest/no-test-return-statement': 'error',
24
+ 'jest/no-truthy-falsy': 'error',
25
+ 'jest/no-try-expect': 'error',
26
+ 'jest/prefer-called-with': 'error',
27
+ 'jest/prefer-expect-assertions': 'off',
28
+ 'jest/prefer-hooks-on-top': 'error',
29
+ 'jest/prefer-inline-snapshots': 'error',
30
+ 'jest/prefer-spy-on': 'error',
31
+ 'jest/prefer-strict-equal': 'error',
32
+ 'jest/prefer-to-be-null': 'error',
33
+ 'jest/prefer-to-be-undefined': 'error',
34
+ 'jest/prefer-to-contain': 'error',
35
+ 'jest/prefer-to-have-length': 'error',
36
+ 'jest/prefer-todo': 'error',
37
+ 'jest/require-top-level-describe': 'error',
38
+ 'jest/require-to-throw-message': 'error',
39
+ 'jest/valid-describe': 'error',
40
+ 'jest/valid-expect-in-promise': 'error',
41
+ 'jest/valid-expect': 'error',
42
+ 'jest/valid-title': 'error',
43
+ },
44
+ };
@@ -0,0 +1,26 @@
1
+ module.exports = {
2
+ env: {
3
+ browser: true,
4
+ },
5
+ plugins: [
6
+ 'jsx-a11y',
7
+ 'react-hooks',
8
+ 'react',
9
+ ],
10
+ settings: {
11
+ react: {
12
+ version: 'detect',
13
+ },
14
+ },
15
+ parserOptions: {
16
+ ecmaFeatures: {
17
+ jsx: true,
18
+ },
19
+ },
20
+ extends: [
21
+ './rules/react-a11y',
22
+ './rules/react-hooks',
23
+ './rules/react',
24
+ ].map(require.resolve),
25
+ rules: {},
26
+ };