-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
80 lines (76 loc) · 2.65 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
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"typescript-sort-keys",
"simple-import-sort",
"import",
"deprecation",
"prettier"
],
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"ignorePatterns": ["**/*.js"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "tsconfig.json"
},
"env": {
"es6": true,
"node": true
},
"rules": {
// simple-import-sort
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
// typescript-sort-keys
"typescript-sort-keys/interface": "error",
"typescript-sort-keys/string-enum": "error",
// common
"no-return-await": "error",
"no-unreachable-loop": "error",
"no-promise-executor-return": "error",
"no-unsafe-optional-chaining": "error",
"no-useless-backreference": "error",
"require-atomic-updates": "error",
"require-await": "error",
"no-await-in-loop": "error",
"spaced-comment": "error",
"sort-imports": "off",
"sort-keys": "error",
"no-unused-vars": "off", // typescript-eslint suggestion: off
"curly": "error",
"camelcase": "error",
// TypeScript
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/semi": "error",
"@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/quotes": [
"error",
"double",
{ "avoidEscape": true }
],
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-empty-interface": "error",
"@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": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": "error",
// deprecation
"deprecation/deprecation": "warn"
}
}