-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.js
40 lines (37 loc) · 909 Bytes
/
eslint.config.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
// @ts-check
import tseslint from "typescript-eslint";
const ignores = [
"node_modules",
"dist",
"docs",
"**/*.d.ts",
"**/*.spec.ts",
"**/*.test.ts",
"**/tests/**",
"eslint.config.js",
"eslint.config.test.js",
"vitest.config.js",
];
export default tseslint.config(
...tseslint.configs.recommended.map((x) => ({ ...x, ignores })),
{
languageOptions: {
parserOptions: {
parser: "@typescript-eslint/parser",
project: "./tsconfig.json",
tsconfigRootDir: "./",
},
},
files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
ignores,
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "_" },
],
"@typescript-eslint/no-floating-promises": ["error"],
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-explicit-any": "off",
},
}
);