-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
100 lines (100 loc) · 2.77 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
96
97
98
99
100
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'airbnb-typescript',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
ecmaFeatures: {
jsx: true,
},
ecmaVersion: '2021',
sourceType: 'module',
},
plugins: ['react', 'jsx-a11y', '@typescript-eslint', 'import', 'prettier', 'react-hooks'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'react/react-in-jsx-scope': 'off',
'react/function-component-definition': 'off',
'react/jsx-no-useless-fragment': 'off',
'react/jsx-curly-brace-presence': 'error',
'react/prop-types': 'off',
'@typescript-eslint/dot-notation': 'off',
'no-underscore-dangle': ['error', { allow: ['__typename'] }],
'import/prefer-default-export': 'off',
'no-console': ['warn', { allow: ['warn', 'error'] }],
'no-unused-vars': 'off',
'import/no-named-as-default': 0,
'consistent-return': 0,
'no-restricted-syntax': 0,
'@typescript-eslint/naming-convention': 0,
'@typescript-eslint/no-loop-func': 0,
'no-param-reassign': 0,
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'newline-per-chained-call': 0,
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
'newlines-between': 'always',
},
],
'@typescript-eslint/no-explicit-any': 'error',
'react/jsx-filename-extension': [
'warn',
{
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['**/*.test.ts', '**/*.test.tsx'],
optionalDependencies: true,
peerDependencies: true,
bundledDependencies: true,
},
],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
mjs: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'react/no-deprecated': 'off',
'react/no-string-refs': 'off',
'react/require-render-return': 'off',
'react/display-name': 'off',
},
settings: {
react: {
version: 'detect',
},
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
moduleDirectory: ['node_modules', 'src'],
},
},
},
};