-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
105 lines (101 loc) · 4.09 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
{
"extends": "@goodboydigital/eslint-config",
"parserOptions": {
"project": ["./tsconfig.eslint.json"]
},
"rules": {
"no-duplicate-imports": "off",
// misc
"@typescript-eslint/array-type": ["error", {"default":"array"}],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/consistent-type-imports": "error",
// project aware
"@typescript-eslint/method-signature-style": "error",
"@typescript-eslint/member-delimiter-style": "error",
"@typescript-eslint/explicit-member-accessibility": ["error", { "overrides": { "constructors": "no-public", "accessors" : "off" } }],
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "memberLike",
"modifiers": ["private"],
"format": ["camelCase"],
"leadingUnderscore": "require"
}
],
// project aware recommended
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unsafe-return": "error",
"@typescript-eslint/prefer-regexp-exec": "error",
"require-await": "off",
"@typescript-eslint/require-await": "error",
// recommended
"@typescript-eslint/adjacent-overload-signatures": "error",
"no-array-constructor": "off",
"@typescript-eslint/no-array-constructor": "error",
"no-empty-function": "off",
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-empty-interface": "error",
// "@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"no-extra-semi": "off",
"@typescript-eslint/no-extra-semi": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/triple-slash-reference": "error",
"constructor-super": "off",
"getter-return": "off",
"no-const-assign": "off",
"no-dupe-args": "off",
"no-dupe-class-members": "off",
"no-dupe-keys": "off",
"no-func-assign": "off",
"no-import-assign": "off",
"no-new-symbol": "off",
"no-obj-calls": "off",
"no-redeclare": "off",
"no-setter-return": "off",
"no-this-before-super": "off",
"no-undef": "off",
"no-unreachable": "off",
"no-unsafe-negation": "off",
"no-var": "error",
"prefer-const": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"valid-typeof": "off",
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/ban-types": 0
},
"overrides": [
{
"files": ["*.js"],
"rules": {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/explicit-member-accessibility": "off"
}
},
{
"files": ["*.test.ts"],
"rules": {
"simple-import-sort/sort": "off"
}
}
]
}