-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
57 lines (56 loc) · 1.96 KB
/
index.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import typescriptEslint from "typescript-eslint";
import vitest from "eslint-plugin-vitest";
import nodePlugin from "eslint-plugin-n";
import deprecationPlugin from "eslint-plugin-deprecation";
import js from "@eslint/js";
import { fixupPluginRules, fixupConfigRules } from "@eslint/compat";
import eslintConfigPrettier from "eslint-config-prettier";
export default [
js.configs.recommended,
...typescriptEslint.configs.recommended,
...typescriptEslint.configs.recommendedTypeChecked,
nodePlugin.configs["flat/recommended-module"],
...fixupConfigRules({
...deprecationPlugin.configs.recommended,
plugins: { ["deprecation"]: fixupPluginRules(deprecationPlugin) },
}),
{
ignores: ["dist", ".wrangler", "**/api.d.ts", "**/*-definitions.ts"],
},
{
languageOptions: {
parserOptions: {
projectService: true,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"n/no-unpublished-import": "off",
"n/no-missing-import": "off",
"n/no-unsupported-features/node-builtins": "off",
eqeqeq: ["error"],
"@typescript-eslint/no-shadow": 2,
semi: ["error", "always"],
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/unbound-method": "off",
},
},
{
files: ["**/*.test.ts", "**/*.test.tsx", "./src/__tests__/**/*.ts"],
...vitest.configs.recommended,
rules: {
...vitest.configs.recommended.rules,
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/ban-ts-comment": "off",
"vitest/no-export": "off",
"vitest/expect-expect": "off",
"vitest/no-conditional-expect": "off",
},
},
eslintConfigPrettier,
];