-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
46 lines (45 loc) · 1.33 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
42
43
44
45
46
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import prettierConfig from "eslint-config-prettier";
export default tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
prettierConfig,
{
// Base configuration for all files
ignores: ["**/node_modules/**", "**/dist/**", "src/abis/*.ts", "scripts", "copyPackageFile.js"],
},
{
plugins: {
"@typescript-eslint": tseslint.plugin,
},
// TypeScript files configuration
files: ["**/*.ts"],
languageOptions: {
parserOptions: {
project: ["./tsconfig.json", "./tsconfig.test.json"],
tsconfigRootDir: ".",
},
},
rules: {
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/await-thenable": "warn",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-require-imports": "off",
},
},
{
// JavaScript files configuration
files: ["**/*.js", "**/*.mjs", "**/*.cjs"],
ignores: ["src/**/*.ts", "**/node_modules/**", "**/dist/**"],
extends: [tseslint.configs.disableTypeChecked],
languageOptions: {
sourceType: "module",
},
rules: {
// Add JavaScript-specific rules here if needed
},
}
);