-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy patheslint.config.mjs
44 lines (39 loc) · 1.04 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
import { FlatCompat } from "@eslint/eslintrc";
import { fixupPluginRules } from "@eslint/compat";
import tseslint from "typescript-eslint";
const compat = new FlatCompat();
const compatConfig = compat.extends("next/core-web-vitals");
const patchedConfig = compatConfig.map((entry) => {
if (entry.plugins) {
for (const [key, plugin] of Object.entries(entry.plugins)) {
entry.plugins[key] = fixupPluginRules(plugin);
}
}
return entry;
});
const config = [
...patchedConfig,
...tseslint.configs.recommended,
{
files: ["**/*.ts", "**/*.tsx"],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: "./tsconfig.json",
ecmaVersion: "latest",
sourceType: "module",
},
},
plugins: {
"@typescript-eslint": tseslint.plugin,
},
rules: {
// Add any TypeScript-specific rules here
},
},
{
ignores: [".next/*", "out/*","node_modules/*",
"**/components/ui/**"]
},
];
export default config;