Skip to content

Commit 263f56e

Browse files
author
Tuan
committed
fix eslint
1 parent d6139a4 commit 263f56e

File tree

3 files changed

+24
-15
lines changed

3 files changed

+24
-15
lines changed

.eslintignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
z_tests/
22
**/*.d.ts
3-
**/*.js
3+
**/*.js
4+
**/*.eslintrc.cjs

.eslintrc.cjs

+19-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
module.exports = {
2-
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
3-
parser: '@typescript-eslint/parser',
4-
parserOptions: {
5-
parser: "@typescript-eslint/parser",
6-
project: "./tsconfig.json",
7-
},
8-
plugins: ['@typescript-eslint'],
9-
rules:{
10-
"@typescript-eslint/no-floating-promises": "error"
11-
},
12-
root: true,
13-
};
2+
extends: [
3+
"eslint:recommended",
4+
"plugin:@typescript-eslint/eslint-recommended",
5+
"plugin:@typescript-eslint/recommended",
6+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
7+
],
8+
parser: "@typescript-eslint/parser",
9+
parserOptions: {
10+
sourceType: "module",
11+
tsconfigRootDir: __dirname,
12+
project: ["./tsconfig.json"],
13+
},
14+
plugins: ["@typescript-eslint"],
15+
rules: {
16+
"require-await": "off",
17+
"@typescript-eslint/require-await": "error",
18+
},
19+
root: true,
20+
};

tsconfig.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"strict": true,
44
"outDir": "bin",
55
"target": "esnext",
6-
"lib": ["es2019","esnext.array"],
6+
"lib": ["es2019", "esnext.array"],
77
"module": "commonjs",
88
"moduleResolution": "node",
99
"sourceMap": true,
@@ -17,5 +17,6 @@
1717
"resolveJsonModule": true
1818
},
1919
"files": ["index.ts"],
20-
"exclude": ["node_modules","*.test.ts"]
20+
"include": ["**/*.ts"],
21+
"exclude": ["node_modules", "*.test.ts"]
2122
}

0 commit comments

Comments
 (0)