-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.mjs
55 lines (48 loc) · 1.53 KB
/
eslint.config.mjs
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
import tslint from "typescript-eslint";
import jslint from "@eslint/js";
export default [
{
ignores: ["**/node_modules", "**/node_build", "src/gen_parser.ts"],
},
jslint.configs.recommended,
...tslint.configs.strict,
{
rules: {
eqeqeq: ["error", "always"],
"no-promise-executor-return": "error",
"no-template-curly-in-string": "error",
"no-else-return": ["error", {
allowElseIf: false,
}],
"no-eval": "error",
"no-implied-eval": "error",
"no-loop-func": "error",
"no-useless-concat": "error",
"no-shadow": "error",
"brace-style": ["warn", "1tbs", {
allowSingleLine: true,
}],
"comma-spacing": "warn",
"key-spacing": "warn",
semi: ["error", "always"],
"space-infix-ops": "warn",
"sort-imports": ["warn", {
ignoreCase: false,
ignoreMemberSort: false,
ignoreDeclarationSort: true,
memberSyntaxSortOrder: ["none", "single", "multiple", "all"],
allowSeparatedGroups: false,
}],
"arrow-spacing": "warn",
"comma-dangle": ["warn", "always-multiline"],
"no-var": "error",
"prefer-const": "warn",
},
},
{
files: ["**/*.test.ts"],
rules: {
"@typescript-eslint/no-non-null-assertion": "off",
},
},
];