-
Notifications
You must be signed in to change notification settings - Fork 7
/
.eslintrc.js
82 lines (81 loc) · 2.42 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
module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "simple-import-sort"],
parserOptions: {
project: "tsconfig.json",
sourceType: "module",
tsconfigRootDir: __dirname,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:prettier/recommended",
"prettier/@typescript-eslint",
],
rules: {
"simple-import-sort/sort": "error",
"@typescript-eslint/prefer-regexp-exec": "error",
"require-atomic-updates": "error",
"no-prototype-builtins": "error",
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
overrides: {
constructors: "off",
},
},
],
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-misused-promises": [
"error",
{
checksVoidReturn: false,
},
],
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"no-constant-condition": ["error", { checkLoops: false }],
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/unified-signatures": "error",
"sort-imports": "off",
"arrow-body-style": [
"error",
"as-needed",
{ requireReturnForObjectLiteral: true },
],
"arrow-parens": ["off", "as-needed"],
"default-case": "error",
"dot-notation": "error",
eqeqeq: "error",
"guard-for-in": "error",
"no-bitwise": "error",
"no-console": "warn",
"no-new-wrappers": "error",
"no-return-await": "error",
"no-shadow": "error",
"no-template-curly-in-string": "error",
"no-throw-literal": "error",
"no-undef-init": "error",
"no-unused-expressions": [
"error",
{
allowTaggedTemplates: true,
},
],
"no-var": "error",
"object-shorthand": "error",
"one-var": ["error", "never"],
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-object-spread": "error",
radix: "error",
"spaced-comment": "error",
},
};