This repository has been archived by the owner on Jan 16, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
75 lines (75 loc) · 2.25 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/strict',
'plugin:@typescript-eslint/strict-type-checked',
'plugin:@typescript-eslint/stylistic',
'plugin:@typescript-eslint/stylistic-type-checked',
],
plugins: [
'jsx-a11y',
'react',
'prettier',
'react-hooks',
'import',
'@typescript-eslint',
'simple-import-sort',
],
rules: {
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react/no-unescaped-entities': 'off',
'prettier/prettier': ['error', {usePrettierrc: true}],
'no-console': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'import/namespace': ['error', {allowComputed: true}],
'prefer-object-spread': 'warn',
'id-length': ['warn', {min: 2, exceptions: ['_', 'x', 'y', 'p']}],
'sort-imports': 'off',
'no-unused-vars': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/array-type': [
'warn',
{default: 'generic', readonly: 'generic'},
],
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-throw-literal': 'off',
'@typescript-eslint/consistent-type-imports': [
'error',
{prefer: 'type-imports', fixStyle: 'separate-type-imports'},
],
'@typescript-eslint/no-extraneous-class': 'off',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/explicit-member-accessibility': [
'warn',
{accessibility: 'no-public'},
],
},
settings: {
react: {
version: 'detect',
},
},
env: {
browser: true,
node: true,
},
};