-
-
Notifications
You must be signed in to change notification settings - Fork 158
/
.eslintrc.cjs
64 lines (64 loc) · 1.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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
sourceType: 'module'
},
plugins: ['react', '@typescript-eslint', 'json', 'html', 'import'],
env: {
browser: true,
es2021: true,
node: true
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/strict-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'prettier',
'plugin:prettier/recommended'
],
overrides: [
{
files: ['./postcss.config.js', './vite.config.ts', './tailwind.config.ts'],
parserOptions: { project: null }
}
],
rules: {
'import/no-extraneous-dependencies': ['error'],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'no-console': ['warn', { allow: ['warn', 'error'] }],
'react/prop-types': 'off',
'react/display-name': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_'
}
],
'@typescript-eslint/no-misused-promises': [
2,
{
checksVoidReturn: {
attributes: false
}
}
]
},
settings: {
react: {
version: 'detect' // React version. "detect" automatically picks the version you have installed.
}
},
ignorePatterns: ['.eslintrc.cjs']
}