-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
57 lines (57 loc) · 1.22 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
module.exports = {
env: {
browser: true,
es2021: true,
jest: true,
},
extends: [
'plugin:jest/recommended',
'plugin:jest-dom/recommended',
'plugin:react/recommended',
'airbnb',
'airbnb/hooks',
'plugin:jsx-a11y/recommended',
'plugin:prettier/recommended',
],
plugins: ['jsx-a11y', 'prettier', '@typescript-eslint', 'jest'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
settings: {
'import/resolver': {
typescript: {
project: ['./tsconfig.json'],
},
},
},
rules: {
'no-unused-vars': 'warn',
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx'] }],
'react/require-default-props': ['off'],
'react/jsx-key': 'error',
'react/jsx-props-no-spreading': 'off',
'import/extensions': ['off'],
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: ['**/*.test.ts', '**/*.test.tsx'] },
],
},
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'no-undef': 'off',
},
},
{
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
extends: ['plugin:testing-library/react'],
},
],
};