Skip to content

Commit 109a116

Browse files
authored
fix eslint (#485)
1 parent e487c13 commit 109a116

File tree

2 files changed

+32
-61
lines changed

2 files changed

+32
-61
lines changed

.eslintrc.json

Lines changed: 23 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,26 @@
11
{
2-
"extends": [
3-
"eslint:recommended",
4-
"plugin:@typescript-eslint/eslint-recommended",
5-
"plugin:@typescript-eslint/recommended",
6-
"standard"
7-
],
8-
"parser": "@typescript-eslint/parser",
9-
"plugins": ["@typescript-eslint"],
10-
"env": { "node": true },
11-
"parserOptions": {
12-
"ecmaVersion": 6,
13-
"sourceType": "module",
14-
"project": "./tsconfig.eslint.json",
15-
"createDefaultProgram": true
16-
},
17-
"rules": {
18-
"no-console": "off",
19-
"@typescript-eslint/indent": ["error", 2],
20-
"semi": ["error", "never"],
21-
"import/export": "off" // this errors on multiple exports (overload interfaces)
22-
},
23-
"overrides": [
24-
{
25-
"files": ["*.d.ts","*.test-d.ts"],
26-
"rules": {
27-
"no-use-before-define": "off",
28-
"no-redeclare": "off",
29-
"@typescript-eslint/no-explicit-any": "off"
30-
}
2+
"plugins": ["@typescript-eslint"],
3+
"extends": ["eslint:recommended", "standard"],
4+
"overrides": [
5+
{
6+
"files": ["types/*.test-d.ts", "types/*.d.ts"],
7+
"parser": "@typescript-eslint/parser",
8+
"parserOptions": {
9+
"project": ["./tsconfig.eslint.json"]
3110
},
32-
{
33-
"files": ["*.test-d.ts"],
34-
"rules": {
35-
"no-unused-expressions": "off",
36-
"@typescript-eslint/no-var-requires": "off",
37-
"no-unused-vars": "off",
38-
"n/handle-callback-err": "off",
39-
"@typescript-eslint/no-empty-function": "off",
40-
"@typescript-eslint/explicit-function-return-type": "off",
41-
"@typescript-eslint/no-unused-vars": "off",
42-
"@typescript-eslint/no-non-null-assertion": "off",
43-
"@typescript-eslint/no-misused-promises": ["error", {
44-
"checksVoidReturn": false
45-
}]
46-
},
47-
"globals": {
48-
"NodeJS": "readonly"
49-
}
11+
"extends": [
12+
"plugin:@typescript-eslint/recommended",
13+
"plugin:@typescript-eslint/recommended-requiring-type-checking"
14+
],
15+
"rules": {
16+
"no-unused-expressions": "off",
17+
"no-use-before-define": "off",
18+
"no-redeclare": "off",
19+
"@typescript-eslint/require-await": "off",
20+
"@typescript-eslint/no-explicit-any": "off",
21+
"@typescript-eslint/no-floating-promises": "off",
22+
"@typescript-eslint/no-unused-vars": "off"
5023
}
51-
]
52-
}
24+
}
25+
]
26+
}

tsconfig.eslint.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
{
2-
"compilerOptions": {
3-
"target": "es6",
4-
"lib": [ "es2015", "ES2018" ],
5-
"module": "commonjs",
6-
"noEmit": true,
7-
"strict": true
8-
},
9-
"include": [
10-
"types/*.test-d.ts",
11-
"types/*.d.ts"
12-
]
13-
}
2+
"compilerOptions": {
3+
"target": "es6",
4+
"lib": ["ES2015", "ES2018"],
5+
"module": "commonjs",
6+
"noEmit": true,
7+
"strict": true
8+
},
9+
"include": ["types/*.test-d.ts", "types/*.d.ts"]
10+
}

0 commit comments

Comments
 (0)