generated from sudipstha08/react-ts-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
95 lines (95 loc) · 2.56 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
module.exports = {
env: {
node: true,
browser: false,
jest: true,
},
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:react/recommended',
// 'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'react-app'
],
plugins: [
'eslint-plugin-react-compiler',
'jest'
],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
settings: {
react: {
version: 'detect',
},
'import/resolver': {
'babel-module': {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
// alias: {
// '@public': ['./public'],
// '@components': ['./src/components'],
// '@utils': ['./src/utils'],
// '@services': ['./src/services'],
// '@hooks': ['./src/hooks'],
// '@constants': ['./src/constants'],
// '@store': ['./src/store'],
// '@interfaces': ['./src/interfaces'],
// '@queries': ['./src/queries'],
// '@src': ['./src'],
// },
},
},
},
rules: {
'react/prop-types': 'off',
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'cypress/no-unnecessary-waiting': 0,
'no-console': 'error',
'no-alert': 'error',
'@typescript-eslint/no-explicit-any': 0,
'react/display-name': 0,
'react-hooks/exhaustive-deps': 1,
'sort-imports': 'off',
'prettier/prettier': 'error',
'import/first': 'error',
'import/no-duplicates': 'error',
'react/jsx-no-target-blank': 0,
'no-unused-vars': 'off',
'no-useless-return': 'error',
'react/no-unknown-property':0,
'no-return-await': 'error',
'no-else-return': 'error',
'@typescript-eslint/no-var-requires': 0,
'no-async-promise-executor': 0,
'import/no-named-as-default': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'react/jsx-uses-react': 0,
'react/react-in-jsx-scope': 0,
'react-compiler/react-compiler': "error",
"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",
'@typescript-eslint/no-unused-vars': [
2,
{
vars: 'all',
args: 'all',
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
},
],
// 'import/extensions': 0,
// 'import/no-unresolved': 0,
},
}