-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.eslintrc.cjs
96 lines (96 loc) · 2.75 KB
/
.eslintrc.cjs
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
'cypress/globals': true,
},
extends: [
'airbnb',
'airbnb/hooks',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:storybook/recommended',
'plugin:cypress/recommended',
],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
tsconfigRootDir: __dirname,
},
plugins: ['@typescript-eslint', 'react', 'prettier', 'cypress'],
rules: {
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
'@typescript-eslint/no-empty-function': 'warn',
'@typescript-eslint/no-empty-interface': 'warn',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'warn',
'getter-return': 'warn',
'jsx-quotes': ['error', 'prefer-single'],
'linebreak-style': ['error', 'unix'],
'no-async-promise-executor': 'warn',
'no-cond-assign': 'warn',
'no-constant-condition': 'warn',
'no-dupe-else-if': 'warn',
'no-dupe-keys': 'warn',
'no-duplicate-case': 'warn',
'no-empty-pattern': 'warn',
'no-empty': 'warn',
'no-fallthrough': 'warn',
'no-func-assign': 'warn',
'no-irregular-whitespace': 'warn',
'no-misleading-character-class': 'warn',
'no-prototype-builtins': 'warn',
'no-self-assign': 'warn',
'no-undef': 'warn',
'no-unreachable': 'warn',
'no-unsafe-finally': 'warn',
'no-unsafe-optional-chaining': 'warn',
'no-useless-catch': 'warn',
'no-useless-escape': 'warn',
'prefer-const': 'warn',
'react/jsx-key': 'warn',
'react/no-unescaped-entities': 'warn',
'react/no-unknown-property': 'warn',
'react/prop-types': 'warn',
'react/react-in-jsx-scope': 'warn',
'use-isnan': 'warn',
'valid-typeof': 'warn',
semi: ['error', 'always'],
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
'import/extensions': 0,
'cypress/no-assigning-return-values': 'error',
'cypress/no-unnecessary-waiting': 'error',
'cypress/assertion-before-screenshot': 'warn',
'cypress/no-force': 'warn',
'cypress/no-async-tests': 'error',
'cypress/no-pause': 'error',
'@typescript-eslint/no-namespace': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'max-len': 'off',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
ignorePatterns: ['**/*.css', '**/*.scss'],
};