Skip to content

Commit e877e32

Browse files
committed
Extends next/core-web-vitals
1 parent 920e036 commit e877e32

File tree

1 file changed

+35
-31
lines changed

1 file changed

+35
-31
lines changed

eslint.config.mjs

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { defineConfig } from "eslint/config";
2-
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
32
import typescriptEslint from "@typescript-eslint/eslint-plugin";
43
import tsParser from "@typescript-eslint/parser";
54
import path from "node:path";
@@ -15,37 +14,42 @@ const compat = new FlatCompat({
1514
allConfig: js.configs.all
1615
});
1716

18-
export default defineConfig([{
19-
extends: [
20-
...nextCoreWebVitals,
21-
...compat.extends("eslint:recommended"),
22-
...compat.extends("plugin:@typescript-eslint/recommended")
23-
],
24-
25-
plugins: {
26-
"@typescript-eslint": typescriptEslint,
17+
export default defineConfig([
18+
{
19+
ignores: ["next-env.d.ts"],
2720
},
21+
{
22+
extends: [
23+
...compat.extends("next/core-web-vitals"),
24+
...compat.extends("eslint:recommended"),
25+
...compat.extends("plugin:@typescript-eslint/recommended")
26+
],
2827

29-
languageOptions: {
30-
parser: tsParser,
31-
},
28+
plugins: {
29+
"@typescript-eslint": typescriptEslint,
30+
},
3231

33-
rules: {
34-
"array-callback-return": ["error"],
35-
"no-await-in-loop": ["error"],
36-
"no-constant-binary-expression": ["error"],
37-
"no-constructor-return": ["error"],
38-
"no-duplicate-imports": ["error"],
39-
"no-new-native-nonconstructor": ["error"],
40-
"no-self-compare": ["error"],
41-
"no-template-curly-in-string": ["error"],
42-
"no-unmodified-loop-condition": ["error"],
43-
"no-unreachable-loop": ["error"],
44-
"no-unused-private-class-members": ["error"],
45-
"require-atomic-updates": ["error"],
32+
languageOptions: {
33+
parser: tsParser,
34+
},
4635

47-
"@typescript-eslint/no-unused-vars": ["error", {
48-
argsIgnorePattern: "^_",
49-
}],
50-
},
51-
}]);
36+
rules: {
37+
"array-callback-return": ["error"],
38+
"no-await-in-loop": ["error"],
39+
"no-constant-binary-expression": ["error"],
40+
"no-constructor-return": ["error"],
41+
"no-duplicate-imports": ["error"],
42+
"no-new-native-nonconstructor": ["error"],
43+
"no-self-compare": ["error"],
44+
"no-template-curly-in-string": ["error"],
45+
"no-unmodified-loop-condition": ["error"],
46+
"no-unreachable-loop": ["error"],
47+
"no-unused-private-class-members": ["error"],
48+
"require-atomic-updates": ["error"],
49+
50+
"@typescript-eslint/no-unused-vars": ["error", {
51+
argsIgnorePattern: "^_",
52+
}],
53+
},
54+
}
55+
]);

0 commit comments

Comments
 (0)