-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc.js
82 lines (82 loc) · 2.18 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
module.exports = {
parser: '@typescript-eslint/parser',
plugins: [
'@stylistic',
'@stylistic/ts',
'@typescript-eslint',
'import',
'import-newlines',
],
parserOptions: {
project: './tsconfig.eslint.json',
},
rules: {
'no-debugger': 'error',
'no-console': 'error',
'no-unsafe-negation': 'error',
'@stylistic/arrow-parens': ['error', 'as-needed'],
'@stylistic/quote-props': ['error', 'as-needed'],
'@stylistic/ts/comma-spacing': 'error',
'@stylistic/no-trailing-spaces': 'error',
'@stylistic/ts/indent': [
'error',
2,
{
VariableDeclarator: { var: 2, let: 2, const: 3 },
SwitchCase: 1,
CallExpression: { arguments: 'first' },
ObjectExpression: 'first',
CallExpression: { arguments: 'first' },
},
],
'import/first': 'error',
'no-duplicate-imports': 'error',
'import/no-duplicates': 'error',
'import/newline-after-import': 'error',
'import/order': [
'error',
{ 'newlines-between': 'never' },
],
'import-newlines/enforce': [
'error',
{
'max-len': 65,
semi: false,
},
],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: 'options',
destructuredArrayIgnorePattern: '^_',
},
],
'@stylistic/ts/semi': ['error', 'never'],
'@stylistic/ts/member-delimiter-style': [
'error',
{
multiline: { delimiter: 'comma', requireLast: true },
singleline: { delimiter: 'comma', requireLast: false },
},
],
'@stylistic/ts/quotes': ['error', 'single'],
'@stylistic/ts/comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'ignore',
generics: 'always-multiline',
tuples: 'always-multiline',
},
],
'@stylistic/ts/object-curly-spacing': ['error', 'always'],
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/consistent-type-imports': [
'error',
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' },
],
},
}