-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.json
154 lines (154 loc) · 4.08 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
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
{
"env": {
"commonjs": true,
"es6": true
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020
},
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-redeclare": [
"error",
{ "ignoreDeclarationMerge": true }
],
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-use-before-define": [
"error",
{ "typedefs": false, "variables": false }
],
"array-callback-return": "error",
"arrow-parens": ["error", "always"],
"capitalized-comments": "error",
"class-methods-use-this": "error",
"camelcase": "error",
"comma-dangle": ["error", "never"],
"comma-spacing": ["error", { "after": true, "before": false }],
"complexity": ["error", 16],
"consistent-return": "error",
"curly": ["error", "all"],
"default-case": "error",
"default-case-last": "error",
"dot-notation": "error",
"eol-last": ["error", "never"],
"eqeqeq": "error",
"global-require": "error",
"indent": ["error", "tab", { "SwitchCase": 1 }],
"max-len": ["error", 80, 4],
"max-params": ["error", 4],
"no-alert": "error",
"no-buffer-constructor": "error",
"no-await-in-loop": "error",
"no-caller": "error",
"no-console": "error",
"no-continue": "error",
"no-else-return": "error",
"no-empty": "error",
"no-empty-function": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-floating-decimal": "error",
"no-fallthrough": "error",
"no-global-assign": "error",
"no-implicit-coercion": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-invalid-this": "error",
"no-iterator": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
"no-magic-numbers": [
"error",
{
"ignore": [-2, -1, 0, 1, 2, "-2n", "-1n", "0n", "1n", "2n"],
"detectObjects": true,
"enforceConst": true,
"ignoreArrayIndexes": true
}
],
"no-mixed-operators": "error",
"no-mixed-requires": "error",
"no-multi-assign": "error",
"no-multi-spaces": "error",
"no-multi-str": "error",
"no-new-require": "error",
"no-new-wrappers": "error",
"no-new": "error",
"no-octal-escape": "error",
"no-param-reassign": "error",
"no-process-exit": "error",
"no-proto": "error",
"no-prototype-builtins": "error",
"no-redeclare": "off",
"no-return-assign": "error",
"no-return-await": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-shadow": "error",
"no-sync": "error",
"no-template-curly-in-string": "error",
"no-ternary": "error",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-unmodified-loop-condition": "error",
"no-unsafe-negation": "error",
"no-unused-expressions": "error",
"no-unused-vars": "off",
"no-useless-call": "error",
"no-useless-concat": "error",
"no-useless-rename": "error",
"no-useless-return": "error",
"no-var": "error",
"no-void": "error",
"no-with": "error",
"one-var": ["error", "never"],
"object-shorthand": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-destructuring": "error",
"prefer-promise-reject-errors": "error",
"prefer-regex-literals": "error",
"quote-props": ["error", "consistent-as-needed"],
"quotes": ["error", "single"],
"require-atomic-updates": "off",
"require-await": "error",
"semi": ["error", "always"],
"semi-spacing": ["error", { "after": false, "before": false }],
"sort-keys": "error",
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": "error",
"strict": "error",
"switch-colon-spacing": "error",
"yoda": "error"
},
"overrides": [
{
"files": "*.js",
"parserOptions": {
"sourceType": "script"
},
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
},
{
"files": ["*.d.ts"],
"rules": {
"strict": "off"
}
},
{
"files": ["*.test.js", "*.test-d.ts"],
"rules": {
"@typescript-eslint/ban-ts-comment": "off"
}
}
]
}