-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
140 lines (140 loc) · 5.09 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
},
env: {
browser: true,
node: true,
jest: true,
},
ignorePatterns: [
'**/{node_modules,es}',
'*.js',
'*.d.ts',
],
plugins: [
"@typescript-eslint",
],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:promise/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
],
rules: {
"arrow-parens": ["error", "as-needed"],
"array-bracket-spacing": ["error", "never"],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"comma-dangle": ["error", "always-multiline"],
"curly": "error",
"generator-star-spacing": ["error", {
"before": false,
"after": true,
"anonymous": "neither",
"method": "neither"
}],
"new-parens": "error",
"no-multi-spaces": [
"error",
{
"ignoreEOLComments": true
}
],
"no-console": ["error", { "allow": ["info", "warn", "error", "debug", "trace"] }],
"no-inner-declarations": "error",
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1 }],
"no-trailing-spaces": "error",
"no-void": ["error", { "allowAsStatement": true }],
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "*", "next": ["return", "break"] },
{ "blankLine": "never", "prev": "*", "next": ["case", "default"] },
{ "blankLine": "always", "prev": ["const", "let", "var"], "next": "*" },
{ "blankLine": "any", "prev": ["const", "let", "var"], "next": ["const", "let", "var"] }
],
"promise/always-return": "off",
// TODO:: will be opened
"promise/catch-or-return": "off",
"prefer-rest-params": "off",
"semi": ["error", "always"],
"space-in-parens": ["error", "never"],
"@typescript-eslint/comma-spacing": "error",
"@typescript-eslint/no-namespace": "off",
// TODO:: will be ["error", "never"]
"import/prefer-default-export": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{ "vars": "all", "varsIgnorePattern": "^_", "args": "none", "caughtErrors": "all", "caughtErrorsIgnorePattern": "^ignore" }
],
"@typescript-eslint/ban-ts-comment": "off",
// TODO:: will be opened
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/indent": ["error", 2],
"@typescript-eslint/keyword-spacing": "error",
// TODO:: will be opened
"@typescript-eslint/no-var-requires": "off",
// TODO:: will be opened
"@typescript-eslint/no-non-null-assertion": "off",
// TODO:: will be opened
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
// TODO:: will be opened
"@typescript-eslint/no-unsafe-return": "off",
// TODO:: will be opened
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/object-curly-spacing": ["error", "always"],
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/return-await": "error",
// TODO:: will be opened
"@typescript-eslint/restrict-plus-operands": "off",
// TODO:: will be opened
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/space-infix-ops": ["error", { "int32Hint": false }],
// TODO:: will be "error"
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/no-floating-promises": ["error", { "ignoreVoid": true, "ignoreIIFE": true }],
"@typescript-eslint/quotes": ["error", "single"],
// TODO:: will be opened
"@typescript-eslint/require-await": "off",
"@typescript-eslint/space-before-blocks": "error",
"@typescript-eslint/space-before-function-paren": ["error", "always"],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "off",
// TODO:: will be opened
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/semi": "error",
// TODO:: will be opened
"@typescript-eslint/member-delimiter-style": ["error", {
"multiline": {
"delimiter": "comma",
"requireLast": true
},
"singleline": {
"delimiter": "comma",
"requireLast": false
}
}],
"@typescript-eslint/no-unsafe-assignment": "off",
// TODO:: will be opened
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"disallowTypeAnnotations": false,
},
],
},
};