-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
72 lines (67 loc) · 1.62 KB
/
.eslintrc.js
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
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
'jest/globals': true,
'cypress/globals': true,
},
extends: [
'plugin:@typescript-eslint/recommended',
'eslint:recommended',
'plugin:jsx-a11y/recommended',
'next',
'next/core-web-vitals',
],
parser: '@typescript-eslint/parser',
plugins: [
'react',
'@typescript-eslint',
'jsx-a11y',
'jest',
'testing-library',
'cypress',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-unused-vars': 'off',
// Somehow trigger errors for interfaces from dom lib
'no-undef': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 1 : 0,
'jsx-a11y/anchor-is-valid': 'off',
'react/display-name': 'off',
},
settings: {
react: {
version: 'detect',
},
},
overrides: [
{
files: [
'**/cypress/**/__tests__/**/*.[jt]s?(x)',
'**/cypress/**/?(*.)+(spec|test).[jt]s?(x)',
],
extends: ['plugin:cypress/recommended'],
},
{
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
excludedFiles: '**/cypress/**/?(*.)+(spec|test).[jt]s?(x)',
extends: ['plugin:testing-library/react', 'plugin:jest/recommended'],
rules: {
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
},
},
],
};