-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
64 lines (62 loc) · 1.56 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
const patch = new Array(10).fill(null).map((_, i) => '../'.repeat(i + 1)).join(',');
const FILE_PATCH = `.,..,${patch.slice(1, -1)}`
// eslint-disable-next-line no-undef
module.exports = {
root: true,
globals: {
'process': true,
},
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'eslint-plugin-import',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'quotes': ['error', 'single'],
'no-unused-vars': 'off',
'no-dupe-else-if': 'off',
'no-console': ['error'],
'no-debugger': ['error'],
'no-empty': ['error', { 'allowEmptyCatch': true }],
'@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '_' }],
'@typescript-eslint/member-delimiter-style': [
'warn',
{
multiline: {
delimiter: 'comma',
requireLast: true,
},
singleline: {
delimiter: 'comma',
requireLast: false,
},
},
],
'import/order': [
'error',
{
'pathGroups': [
{
'pattern': `{${FILE_PATCH}}/types`,
'group': 'internal'
},
],
'newlines-between': 'always',
'groups': ['external', 'index', 'internal', ['parent', 'sibling']]
}
],
},
overrides: [
{
'files': ['**/*.ts', '**/*.tsx', '**/*.*.tsx'],
}
]
}