-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.cjs
106 lines (106 loc) · 2.63 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
97
98
99
100
101
102
103
104
105
106
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/strict-type-checked',
],
ignorePatterns: ['dist', '.eslintrc.cts'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
plugins: [
'import',
'prettier',
'react-refresh',
'unused-imports',
'simple-import-sort',
],
settings: {
react: {
version: 'detect',
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
},
},
},
rules: {
"@typescript-eslint/no-dynamic-delete": "off",
'import/no-unresolved': 'error',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-confusing-void-expression': 0,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'react-hooks/exhaustive-deps': 'off',
'no-console': [
'warn',
{
allow: ['warn', 'error', 'debug'],
},
],
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-uses-react': 'off',
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/ban-ts-comment': 'warn',
'react/no-unescaped-entities': 0,
'react/display-name': 0,
'@typescript-eslint/no-unused-vars': 2,
'@typescript-eslint/no-explicit-any': 0,
'tailwindcss/no-custom-classname': 0,
'simple-import-sort/exports': 1,
'simple-import-sort/imports': [
1,
{
groups: [
['^@?\\w', '^\\u0000'],
['^.+\\.s?css$'],
['^@/lib'],
['^@/hooks'],
['^@/components'],
['^@/store'],
['^@/pages'],
['^@/assets'],
['^@/*'],
[
'^\\./?$',
'^\\.(?!/?$)',
'^\\.\\./?$',
'^\\.\\.(?!/?$)',
'^\\.\\./\\.\\./?$',
'^\\.\\./\\.\\.(?!/?$)',
'^\\.\\./\\.\\./\\.\\./?$',
'^\\.\\./\\.\\./\\.\\.(?!/?$)',
],
['^@/types'],
['^'],
],
},
],
},
}