-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc.js
More file actions
94 lines (94 loc) · 2.58 KB
/
Copy path.eslintrc.js
File metadata and controls
94 lines (94 loc) · 2.58 KB
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
module.exports = {
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['*.js'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'unicorn', 'import'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
rules: {
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/return-await': ['error', 'always'],
'@typescript-eslint/no-inferrable-types': ['error', { ignoreProperties: true }],
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
'import/no-unresolved': 'error',
'import/named': 'error',
'import/namespace': 'error',
'import/no-absolute-path': 'error',
'import/no-dynamic-require': 'error',
'import/no-webpack-loader-syntax': 'error',
'import/no-self-import': 'error',
'import/no-useless-path-segments': 'error',
'import/export': 'error',
'import/no-named-as-default': 'error',
'import/no-deprecated': 'error',
'import/no-extraneous-dependencies': 'off',
'import/no-mutable-exports': 'error',
'import/no-unused-modules': 'error',
'import/unambiguous': 'error',
'import/no-commonjs': 'error',
'import/no-amd': 'error',
'import/no-import-module-exports': 'error',
'import/first': 'error',
'import/no-duplicates': 'error',
'import/no-namespace': 'error',
'import/extensions': 'error',
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'type'],
pathGroups: [
{
pattern: '@/config',
group: 'external',
position: 'after',
},
{
pattern: '@/main',
group: 'external',
position: 'after',
},
{
pattern: '@/common/',
group: 'internal',
position: 'before',
},
{
pattern: '@/modules/',
group: 'parent',
position: 'after',
},
{
pattern: '@/test-utils/',
group: 'internal',
position: 'after',
},
],
alphabetize: {
order: 'asc',
},
},
],
'import/newline-after-import': 'error',
'import/no-named-default': 'error',
'import/no-default-export': 'error',
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts']
},
'import/resolver': {
typescript: {},
},
},
};