-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
47 lines (42 loc) · 1.41 KB
/
eslint.config.js
File metadata and controls
47 lines (42 loc) · 1.41 KB
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
import { defineConfig, globalIgnores } from "eslint/config";
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import unusedImports from "eslint-plugin-unused-imports";
import importPlugin from "eslint-plugin-import";
import prettierPluginRecommended from "eslint-plugin-prettier/recommended";
export default defineConfig([
globalIgnores(["node_modules/", ".output/", ".vinxi/"]),
js.configs.recommended,
...tseslint.configs.recommended,
{
plugins: { "unused-imports": unusedImports },
rules: {
"unused-imports/no-unused-imports": "error",
},
},
importPlugin.flatConfigs.recommended,
importPlugin.flatConfigs.react,
importPlugin.flatConfigs.typescript,
// eslintConfigPrettier,
prettierPluginRecommended,
{
rules: {
"no-undef": "off", // https://eslint.org/docs/latest/rules/no-undef#handled_by_typescript
"import/extensions": ["error", "ignorePackages"],
"import/no-unresolved": "off", // handled by typescript
"import/order": "warn",
"@typescript-eslint/no-empty-object-type": [
"error",
{
allowInterfaces: "always",
},
],
},
},
{
files: ["**/*.cjs", "**/*.cts"],
rules: {
"@typescript-eslint/no-require-imports": "off",
},
},
]);