-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
113 lines (113 loc) · 3.59 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
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
{
"globals": {
"XYZ": true /** Add globals from a potential global.d.ts here **/
},
"env": {
"browser": true,
"commonjs": true,
"es2020": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"rules": {
"indent": "off",
"quotes": "off",
"no-tabs": "off",
"semi": "error",
"padded-blocks": "off",
"no-multi-spaces": "off",
"no-multiple-empty-lines": "off",
"spaced-comment": "off",
"operator-linebreak": "off",
"comma-dangle": "off",
"eol-last": "off",
"no-undef-init": "off",
"brace-style": "off",
"no-unneeded-ternary": "off",
"no-return-await": "off",
"max-len": [
2,
340,
{
"ignoreComments": true,
"ignoreTrailingComments": true,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}
],
"no-trailing-spaces": "warn", // disallow trailing whitespace at the end of lines
"space-before-function-paren": [
"warn",
{
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}
],
"eqeqeq": "error",
"require-await": "error",
"no-unreachable": "warn", // disallow unreachable statements after a return, throw, continue, or break statement
"lines-between-class-members": "off",
"no-useless-constructor": "warn",
"no-useless-escape": "warn",
"no-useless-return": "warn",
"valid-typeof": "error",
"prefer-promise-reject-errors": "error",
"handle-callback-err": "error",
"one-var": "off",
"no-mixed-requires": "error",
"new-cap": "off",
"no-empty-function": "warn",
"dot-notation": "warn",
"no-unused-vars": "off", // Rule "@typescript-eslint/no-unused-vars" is used instead
"no-param-reassign": "warn",
"no-useless-concat": "warn",
"array-callback-return": "warn",
"no-use-before-define": "off",
"import/no-useless-path-segments": "off",
"no-mixed-operators": "off",
"guard-for-in": "off",
"curly": [
"off",
"multi-or-nest",
"consistent"
],
"prefer-template": "error", // makes string use `xx`;
"quote-props": "off", // Will change let a= { "foo": bar } into { foo: bar }
"prefer-const": "error",
"camelcase": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/no-this-alias": "off",
"no-console": "off",
"@typescript-eslint/ban-types": [
"off",
{
"types": {
"String": {
"message": "Use string instead of String",
"fixWith": "string"
},
"{}": {
"message": "Don't use {}, probably replace with 'undefined'"
// "fixWith": "undefined"
}
}
}
],
"@typescript-eslint/no-explicit-any": [
"warn",
{
"fixToUnknown": false,
"ignoreRestArgs": true
}
]
}
}