-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc.js
48 lines (47 loc) · 2.2 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
const jsConfig = require("./.eslintrc_js")
module.exports = {
env: {node: true},
parser: "@typescript-eslint/parser",
parserOptions: {
project: ["./tsconfig.json"],
},
plugins: ["@typescript-eslint"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
],
rules: {
...jsConfig.rules,
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/no-redundant-type-constituents": "error",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-redeclare": "error",
"@typescript-eslint/no-base-to-string": ["error", { ignoredTypeNames: ["Error", "RegExp", "RegExpLike", "URL", "URLSearchParams"] }], // 1 instance
"@typescript-eslint/no-use-before-define": ["error", "nofunc"],
"no-duplicate-imports": "off",
"@typescript-eslint/default-param-last": "error",
"dot-notation": "off",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/explicit-function-return-type": ["error", {allowExpressions: true}],
"@typescript-eslint/explicit-member-accessibility": ["error", {accessibility: "no-public"}],
"@typescript-eslint/no-extraneous-class": "error",
"no-invalid-this": "off",
"@typescript-eslint/no-invalid-this": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/parameter-properties": ["error", {prefer: "parameter-property"}],
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": ["error", {argsIgnorePattern: "^_"}],
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/require-array-sort-compare": ["error", {ignoreStringArrays: true}],
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/no-unnecessary-condition": ["error", {allowConstantLoopConditions: true}],
},
}