-
Notifications
You must be signed in to change notification settings - Fork 186
/
Copy patheslint.config.mjs
41 lines (39 loc) · 1.52 KB
/
eslint.config.mjs
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
import tsParser from "@typescript-eslint/parser";
import tsPlugin from "@typescript-eslint/eslint-plugin";
const config = [
{
files: [
"typings/**/*.ts",
"src/**/*.ts"
],
languageOptions: {
parser: tsParser, // Use the imported parser object
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: "./tsconfig.json", // Path to your TypeScript configuration file
},
},
plugins: {
"@typescript-eslint": tsPlugin,
},
rules: {
...tsPlugin.configs.recommended.rules,
...tsPlugin.configs["recommended-requiring-type-checking"].rules,
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-empty-object-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-function-type": "off",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"no-console": "warn",
"prefer-const": "off",
},
},
];
export default config;