-
Notifications
You must be signed in to change notification settings - Fork 9
/
.eslintrc.js
120 lines (113 loc) · 3.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
project: './packages/tsconfig.settings.json',
tsconfigRootDir: __dirname
},
plugins: ['@typescript-eslint', 'import'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'plugin:prettier/recommended'
],
env: {
browser: true,
node: true
},
settings: {
'import/resolver': {
typescript: {
project: './packages/tsconfig.settings.json'
}
}
},
rules: {
eqeqeq: ['error', 'always'],
'import/order': [
'warn',
{
alphabetize: {
order: 'asc'
},
'newlines-between': 'always',
groups: ['builtin', 'external', 'internal', ['sibling', 'parent', 'index']]
}
],
'prettier/prettier': 'warn',
'@typescript-eslint/consistent-type-definitions': ['warn', 'interface'],
'@typescript-eslint/explicit-function-return-type': [
'warn',
{
allowConciseArrowFunctionExpressionsStartingWithVoid: true,
allowExpressions: true
}
],
'@typescript-eslint/explicit-member-accessibility': [
'warn',
{
overrides: {
constructors: 'no-public'
}
}
],
'@typescript-eslint/member-ordering': [
'warn',
{
classes: {
memberTypes: [
'public-static-method',
'public-decorated-method',
'public-instance-method',
'public-abstract-method',
'protected-static-method',
'protected-decorated-method',
'protected-instance-method',
'protected-abstract-method',
'private-static-method',
'private-decorated-method',
'private-instance-method',
'private-abstract-method',
'public-constructor',
'protected-constructor',
'private-constructor',
'signature',
'public-static-field',
'public-decorated-field',
'public-instance-field',
'public-abstract-field',
'protected-static-field',
'protected-decorated-field',
'protected-instance-field',
'protected-abstract-field',
'private-static-field',
'private-decorated-field',
'private-instance-field',
'private-abstract-field'
]
}
}
],
'@typescript-eslint/naming-convention': [
'warn',
{
selector: 'interface',
format: ['PascalCase']
},
{
selector: ['accessor', 'typeLike'],
format: ['PascalCase']
},
{
selector: 'enumMember',
format: ['UPPER_CASE']
}
],
'@typescript-eslint/no-extra-semi': 'off',
'@typescript-eslint/no-shadow': 'warn',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_+', ignoreRestSiblings: true }],
'@typescript-eslint/no-useless-constructor': 'warn',
'@typescript-eslint/require-await': 'warn'
}
}