-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.ts
162 lines (160 loc) · 4.49 KB
/
.eslintrc.ts
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
exports.default = {
extends: [
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended"
],
settings: {
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".mjs", ".ts", ".tsx", ".d.ts"]
}
}
},
rules: {
"import/named": "off",
// TS
"@typescript-eslint/type-annotation-spacing": ["error", {}],
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
disallowTypeAnnotations: false
}
],
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
// Override JS
"no-useless-constructor": "off",
indent: "off",
"@typescript-eslint/indent": [
"error",
2,
{
SwitchCase: 1,
VariableDeclarator: 1,
outerIIFEBody: 1,
MemberExpression: 1,
FunctionDeclaration: {
parameters: 1,
body: 1
},
FunctionExpression: {
parameters: 1,
body: 1
},
CallExpression: {
arguments: 1
},
ArrayExpression: 1,
ObjectExpression: 1,
ImportDeclaration: 1,
flatTernaryExpressions: false,
ignoreComments: false,
ignoredNodes: [
"TemplateLiteral *",
"JSXElement",
"JSXElement > *",
"JSXAttribute",
"JSXIdentifier",
"JSXNamespacedName",
"JSXMemberExpression",
"JSXSpreadAttribute",
"JSXExpressionContainer",
"JSXOpeningElement",
"JSXClosingElement",
"JSXFragment",
"JSXOpeningFragment",
"JSXClosingFragment",
"JSXText",
"JSXEmptyExpression",
"JSXSpreadChild",
"TSTypeParameterInstantiation"
],
offsetTernaryExpressions: true
}
],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_"
}
],
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": "error",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": [
"error",
{
functions: false,
classes: false,
variables: true
}
],
"brace-style": "off",
"comma-dangle": "off",
"object-curly-spacing": "off",
"@typescript-eslint/object-curly-spacing": ["error", "always"],
semi: "off",
"@typescript-eslint/quotes": ["error"],
"space-before-blocks": "off",
"@typescript-eslint/space-before-blocks": ["error", "always"],
"space-before-function-paren": "off",
"@typescript-eslint/space-before-function-paren": [
"error",
{
anonymous: "always",
named: "never",
asyncArrow: "always"
}
],
"space-infix-ops": "off",
"@typescript-eslint/space-infix-ops": "error",
"keyword-spacing": "off",
"@typescript-eslint/keyword-spacing": [
"error",
{
before: true,
after: true
}
],
"comma-spacing": "off",
"@typescript-eslint/comma-spacing": [
"error",
{
before: false,
after: true
}
],
"no-extra-parens": "off",
"@typescript-eslint/no-extra-parens": ["error", "functions"],
"no-dupe-class-members": "off",
"@typescript-eslint/no-dupe-class-members": "error",
"no-loss-of-precision": "off",
"@typescript-eslint/no-loss-of-precision": "error",
"lines-between-class-members": "off",
"@typescript-eslint/lines-between-class-members": [
"error",
"always",
{
exceptAfterSingleLine: true
}
],
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/parameter-properties": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/prefer-ts-expect-error": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/semi": "off"
}
};