-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
124 lines (124 loc) · 5.05 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
{
"root": true,
"env": {
"node": true,
"browser": "true",
"mocha": true
},
"parserOptions": {
"ecmaVersion": 2020
},
"extends": [
"eslint:recommended"
],
"plugins": ["import"],
"rules": {
"array-bracket-spacing": ["error", "never"],
"block-spacing": ["error", "always"],
"brace-style": ["error", "1tbs"],
"comma-dangle": ["error", "never"],
"comma-spacing": "error",
"default-param-last": "error",
"func-call-spacing": "error",
"import/no-unresolved": ["error", { "commonjs": true }],
"import/extensions": ["error", "always", { "js": "never" }],
"import/newline-after-import": ["error", { "count": 2 }],
"indent": ["error", 2, { "ignoreComments": true, "SwitchCase": 1 }],
"keyword-spacing": "error",
"linebreak-style": ["error", "unix"],
"no-loss-of-precision": "error",
"no-prototype-builtins": ["off"],
"no-return-await": "error",
"no-trailing-spaces": "error",
"no-tabs": "error",
"no-throw-literal": "error",
"no-unused-expressions": "error",
"no-unused-vars": ["error", { "argsIgnorePattern": "_.*" }],
"object-curly-spacing": ["error", "always"],
"quotes": ["error", "double", { "allowTemplateLiterals": true }],
"semi": ["error", "always"],
"space-before-function-paren": ["error", { "named": "never" }],
"space-infix-ops": "error"
},
"settings": {
"import/resolver": "node"
},
"overrides": [
{
"files": ["**/*.ts"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"parserOptions": {
"project": "./tsconfig.json"
},
"settings": {
"import/resolver": "typescript"
},
"rules": {
"no-prototype-builtins": ["off"],
"import/extensions": ["error", "always", { "ts": "never" }],
"@typescript-eslint/array-type": "error",
"brace-style": "off",
"@typescript-eslint/brace-style": ["error", "1tbs"],
"comma-dangle": "off",
"@typescript-eslint/comma-dangle": ["error", "never"],
"comma-spacing": "off",
"@typescript-eslint/comma-spacing": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/consistent-type-imports": "error",
"default-param-last": "off",
"@typescript-eslint/default-param-last": "error",
"func-call-spacing": "off",
"@typescript-eslint/func-call-spacing": "error",
"indent": "off",
"@typescript-eslint/indent": ["error", 2, { "ignoreComments": true }],
"keyword-spacing": "off",
"@typescript-eslint/keyword-spacing": "error",
"@typescript-eslint/method-signature-style": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
"@typescript-eslint/no-implicit-any-catch": "error",
"no-loss-of-precision": "off",
"@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-meaningless-void-operator": "error",
"no-throw-literal": "off",
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "_.*" }],
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "error",
"object-curly-spacing": "off",
"@typescript-eslint/object-curly-spacing": ["error", "always"],
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"quotes": "off",
"@typescript-eslint/quotes": ["error", "double", { "allowTemplateLiterals": true }],
"no-return-await": "off",
"@typescript-eslint/require-await": ["off"],
"@typescript-eslint/return-await": "error",
"semi": "off",
"@typescript-eslint/semi": ["error", "always"],
"space-before-function-paren": "off",
"@typescript-eslint/space-before-function-paren": ["error", { "named": "never" }],
"space-infix-ops": "off",
"@typescript-eslint/space-infix-ops": "error",
"@typescript-eslint/type-annotation-spacing": "error"
}
}
]
}