Skip to content

Commit 8a70548

Browse files
committed
Enable Next.js lint rules for skin-database and skin-museum-og
- Add @next/eslint-plugin-next to skin-database - Add eslint-config-next to skin-museum-og - Disable @next/next/no-img-element in both packages (OG images use <img>) - Use plugin:@next/next/recommended instead of next/core-web-vitals to avoid Babel version conflicts in skin-database
1 parent 36c5af8 commit 8a70548

File tree

5 files changed

+606
-16
lines changed

5 files changed

+606
-16
lines changed

packages/skin-database/.eslintrc.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
module.exports = {
2-
extends: ["plugin:@typescript-eslint/recommended"],
2+
extends: [
3+
"plugin:@typescript-eslint/recommended",
4+
"plugin:@next/next/recommended",
5+
],
36
rules: {
47
// Disable rules that conflict with the project's style
58
"@typescript-eslint/no-var-requires": "off",
@@ -12,6 +15,8 @@ module.exports = {
1215
"no-shadow": "off",
1316
// camelcase has too many violations (333) to fix now
1417
camelcase: "off",
18+
// This codebase uses <img> for OG images and legacy code
19+
"@next/next/no-img-element": "off",
1520
},
1621
ignorePatterns: ["dist/**"],
1722
};

packages/skin-database/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"@types/node-fetch": "^2.5.7",
7878
"@typescript-eslint/eslint-plugin": "^8.36.0",
7979
"@typescript-eslint/parser": "^8.36.0",
80+
"eslint-config-next": "14",
8081
"grats": "0.0.0-main-e655d1ae",
8182
"typescript": "^5.6.2"
8283
},
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
extends: ["next/core-web-vitals"],
3+
rules: {
4+
// This package generates OG images using <img>
5+
"@next/next/no-img-element": "off",
6+
},
7+
};

packages/skin-museum-og/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"react-dom": "18.2.0"
1616
},
1717
"devDependencies": {
18+
"eslint-config-next": "14",
1819
"vercel": "^28.4.17"
1920
}
2021
}

0 commit comments

Comments
 (0)