-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
47 lines (47 loc) · 1.27 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react-hooks/recommended',
'airbnb-typescript',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs', 'vite.config.ts'],
parserOptions: {
project: './tsconfig.json',
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2021,
sourceType: 'module',
},
settings: {
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
'import/resolver': {
typescript: {},
},
},
plugins: ['unused-imports', 'import', 'react-refresh'],
rules: {
'prettier/prettier': 1,
'unused-imports/no-unused-imports': 'error',
'react/jsx-filename-extension': [
0,
{ extensions: ['.js', '.jsx', '.ts', '.tsx'] },
],
'import/prefer-default-export': 'off',
'@typescript-eslint/no-unused-vars': 1,
'import/extensions': ['error', 'never'],
'import/no-extraneous-dependencies': ['error'],
'@typescript-eslint/no-explicit-any': 1,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'@typescript-eslint/naming-convention': 0,
},
};