Skip to content

Commit f9f18cc

Browse files
committed
feat: (eslint) add tsconfigRootDir property to nextjs config
1 parent 3e79cb2 commit f9f18cc

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

packages/eslint/configs/nextjs.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,26 @@ const nextConfig = defineConfig([
1313
...nextVitals,
1414
...nextTs,
1515
prettier,
16+
{
17+
rules: {
18+
"@typescript-eslint/no-unused-vars": [
19+
"error",
20+
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
21+
],
22+
"@typescript-eslint/consistent-type-imports": [
23+
"warn",
24+
{ prefer: "type-imports", fixStyle: "separate-type-imports" },
25+
],
26+
},
27+
},
28+
{
29+
languageOptions: {
30+
parserOptions: {
31+
projectService: true,
32+
tsconfigRootDir: import.meta.dirname,
33+
},
34+
},
35+
},
1636
]);
1737

1838
export { nextConfig };

0 commit comments

Comments
 (0)