-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
71 lines (71 loc) · 2.21 KB
/
.eslintrc.json
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
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
// common
"no-return-await": "error",
"no-unreachable-loop": "error",
"no-promise-executor-return": "off",
"no-unsafe-optional-chaining": "error",
"no-useless-backreference": "error",
"require-atomic-updates": "error",
"require-await": "error",
"no-await-in-loop": "off",
"spaced-comment": "error",
"no-unused-vars": "off",
"curly": "error",
"semi": "error",
"camelcase": "off",
// TypeScript
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/consistent-type-imports": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-shadow": "off",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/ban-ts-comment": "off"
},
"overrides": [
{
"files": [
"*.ts",
"*.tsx"
],
"rules": {
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowConciseArrowFunctionExpressionsStartingWithVoid": true,
"allowDirectConstAssertionInArrowFunctions": true
}
],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "explicit"
}
]
}
}
]
}