/
.eslintrc.js
69 lines (69 loc) · 1.64 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
module.exports = {
ignorePatterns: ['dist/'],
extends: [
'eslint:recommended',
'plugin:import/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:prettier/recommended',
],
parser: '@typescript-eslint/parser',
settings: {
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: ['examples/**/tsconfig.json', 'packages/**/tsconfig.json'],
},
node: true,
},
react: {
version: 'detect',
},
},
plugins: ['@typescript-eslint'],
root: true,
env: {
browser: true,
es2022: true,
node: true,
},
rules: {
'import/default': 'off',
'import/no-named-as-default-member': 'off',
'import/order': [
'error',
{
alphabetize: { order: 'asc', caseInsensitive: true },
groups: [
'builtin',
'external',
'internal',
['parent', 'sibling', 'index'],
'object',
],
pathGroups: [{ pattern: '@/**', group: 'internal' }],
'newlines-between': 'always',
},
],
'import/no-unresolved': 'off',
},
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'plugin:prettier/recommended',
],
parser: '@typescript-eslint/parser',
rules: {
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
],
};