This repository has been archived by the owner on Mar 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
108 lines (108 loc) · 3.94 KB
/
.eslintrc.js
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
module.exports = {
env: {
es6: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.json",
sourceType: "module",
},
plugins: [
"@typescript-eslint",
"prefer-arrow",
],
rules: {
"@typescript-eslint/array-type": "error",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/member-delimiter-style": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-shadow": ["error"],
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unused-expressions": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", {
vars: "all",
args: "none",
ignoreRestSiblings: false,
}],
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/quotes": ["error", "double", {
avoidEscape: true,
allowTemplateLiterals: true,
}],
"@typescript-eslint/require-await": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/semi": ["error", "always", {
omitLastInOneLineBlock: false,
}],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unified-signatures": "error",
"arrow-body-style": "error",
"arrow-parens": ["error", "as-needed"],
"brace-style": "error",
"comma-dangle": ["error", "always-multiline"],
"curly": "error",
"eol-last": "error",
"eqeqeq": "error",
"guard-for-in": "error",
"import/order": "error",
"max-len": ["error", {
code: 140,
}],
"new-parens": "error",
"no-caller": "error",
// "no-console": "error",
"no-constant-condition": "off",
"no-eval": "error",
"no-multiple-empty-lines": "error",
"no-new-wrappers": "error",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-useless-rename": "error",
"object-curly-spacing": ["error", "always"],
"object-shorthand": "error",
"one-var": ["error", "never"],
"prefer-arrow/prefer-arrow-functions": "error",
"prefer-arrow-callback": "error",
"prefer-const": ["error", {
destructuring: "all",
}],
"quote-props": ["error", "consistent-as-needed"],
"radix": "error",
"space-before-function-paren": ["error", {
anonymous: "never",
asyncArrow: "always",
named: "never",
}],
"spaced-comment": ["error", "always", {
markers: ["/"],
block: {
balanced: true,
},
}],
},
};