-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
103 lines (103 loc) · 3.32 KB
/
.eslintrc
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
{
"root": true,
"env": {
"es2020": true,
"browser": true,
"node": true,
"es6": true,
"commonjs": true,
"jest": true
},
"globals": {
"globalThis": true
},
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "unused-imports"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-var-requires": "off",
"array-callback-return": ["error", { "allowImplicit": true }],
"constructor-super": "error",
"no-undef": "error",
"curly": ["error", "multi-line"],
"for-direction": "error",
"guard-for-in": "off",
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1 }],
"no-alert": "error",
"no-caller": "error",
"no-constant-binary-expression": "error",
"no-constructor-return": "error",
"no-debugger": "error",
"no-self-assign": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-throw-literal": "error",
"no-unused-expressions": "error",
"no-async-promise-executor": "error",
"getter-return": "error",
"semi": ["error", "never"],
"quotes": ["error", "double"],
"max-depth": ["error", 3],
"max-nested-callbacks": ["error", 3],
"max-len": ["error", 80],
"prefer-const": "error",
"no-console": "error",
"unused-imports/no-unused-imports": "error",
"@typescript-eslint/no-unused-vars": "error",
"no-else-return": ["error", { "allowElseIf": false }],
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"max-lines-per-function": [
"error",
{ "max": 30, "skipBlankLines": true, "skipComments": true }
],
"no-restricted-syntax": [
"error",
{
"selector": "FunctionDeclaration[async=false][id.name=/Async$/]",
"message": "Function ending in 'Async' must be declared async"
},
{
"selector": "FunctionDeclaration[async=true][id.name!=/Async$/]",
"message": "Async function name must end in 'Async'"
},
{
"selector": "MethodDefinition[value.async=false][key.name=/Async$/]",
"message": "Method ending in 'Async' must be declared async"
},
{
"selector": "MethodDefinition[value.async=true][key.name!=/Async$/]",
"message": "Async method name must end in 'Async'"
},
{
"selector": "Property[value.type=/FunctionExpression$/][value.async=false][key.name=/Async$/]",
"message": "Function ending in 'Async' must be declared async"
},
{
"selector": "Property[value.type=/FunctionExpression$/][value.async=true][key.name!=/Async$/]",
"message": "Async function name must end in 'Async'"
},
{
"selector": "VariableDeclarator[init.type=/FunctionExpression$/][init.async=false][id.name=/Async$/]",
"message": "Function ending in 'Async' must be declared async"
},
{
"selector": "VariableDeclarator[init.type=/FunctionExpression$/][init.async=true][id.name!=/Async$/]",
"message": "Async function name must end in 'Async'"
}
]
}
}