-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
48 lines (48 loc) · 1.46 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
module.exports = {
env: {
browser: true,
es2021: true
},
extends: ['eslint:recommended', 'plugin:react/recommended', 'plugin:@typescript-eslint/recommended', 'plugin:storybook/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 12,
sourceType: 'module'
},
plugins: ['react', '@typescript-eslint', 'testing-library', "jest-dom"],
settings: {
react: {
version: 'detect'
}
},
rules: {
'react/prop-types': 'off',
'react/display-name': 'warn',
'no-undef': 'off',
'testing-library/await-async-queries': 'error',
'testing-library/no-await-sync-queries': 'error',
'testing-library/no-debugging-utils': 'warn',
"jest-dom/prefer-checked": "error",
"jest-dom/prefer-enabled-disabled": "error",
"jest-dom/prefer-required": "error",
"jest-dom/prefer-to-have-attribute": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-unused-expressions": ["off", {"allowShortCircuit": true}],
'@typescript-eslint/no-unused-vars': ['error', {
argsIgnorePattern: '^_',
varsIgnorePattern: '^_'
}],
'storybook/no-uninstalled-addons': ['error', { packageJsonLocation: '../package.json' }]
},
// overrides: [{
// files: ["./src/*.js", "./src/*.ts", "./src/*.tsx"],
// rules: {
// "no-unused-expressions": ["error", {
// "allowShortCircuit": true
// }]
// }
// }]
};