-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
83 lines (83 loc) · 2.07 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'react', 'prettier'],
extends: [
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:prettier/recommended',
],
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
},
env: {
node: true,
commonjs: true,
es6: true,
jest: true,
},
settings: {
'import/resolver': {
typescript: {},
},
react: {
pragma: 'React',
version: 'detect',
},
},
rules: {
'@typescript-eslint/consistent-type-definitions': 1,
'@typescript-eslint/consistent-type-imports': 1,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-use-before-define': ['error'],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: ['**/*.test.ts', '**/*.test.tsx', 'jest.setup.ts', 'test/**'] },
],
'import/order': [
'error',
{
alphabetize: { order: 'asc', caseInsensitive: true },
'newlines-between': 'never',
pathGroups: [
{
pattern: 'react',
group: 'builtin',
position: 'before',
},
],
pathGroupsExcludedImportTypes: ['react'],
},
],
'import/prefer-default-export': 0,
'no-param-reassign': ['error', { ignorePropertyModificationsFor: ['draft', 'state'], props: true }],
'no-shadow': 0,
'no-use-before-define': 'off',
'react/prop-types': 0,
'react/react-in-jsx-scope': 0,
},
};