Skip to content

Commit b98abd0

Browse files
committed
build: migrate to eslint ^8.57.1
latest version with next.js support
1 parent e4d45e8 commit b98abd0

File tree

10 files changed

+304
-115
lines changed

10 files changed

+304
-115
lines changed

.eslintrc.json

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
{
22
"extends": [
33
"eslint:recommended",
4-
"plugin:@typescript-eslint/recommended",
54
"next/core-web-vitals",
6-
"prettier",
7-
"plugin:storybook/recommended"
5+
"prettier"
86
],
97
"env": {
10-
"es6": true
8+
"es6": true,
9+
"node": true,
10+
"browser": true
1111
},
1212
"plugins": ["simple-import-sort", "@typescript-eslint", "unused-imports"],
1313
"parser": "@typescript-eslint/parser",
14+
"parserOptions": {
15+
"ecmaVersion": "latest",
16+
"sourceType": "module",
17+
"ecmaFeatures": {
18+
"jsx": true
19+
}
20+
},
1421
"rules": {
1522
"simple-import-sort/imports": [
1623
"error",
@@ -48,13 +55,6 @@
4855
],
4956
"simple-import-sort/exports": "error",
5057
"no-unused-vars": "off",
51-
"@typescript-eslint/no-unused-vars": "off",
52-
"@typescript-eslint/no-explicit-any": [
53-
"error",
54-
{
55-
"fixToUnknown": true
56-
}
57-
],
5858
"unused-imports/no-unused-vars": [
5959
"error",
6060
{
@@ -64,5 +64,36 @@
6464
}
6565
],
6666
"unused-imports/no-unused-imports-ts": "warn"
67-
}
67+
},
68+
"overrides": [
69+
{
70+
"files": ["**/*.{ts,tsx}"],
71+
"extends": ["plugin:@typescript-eslint/recommended"],
72+
"rules": {
73+
"@typescript-eslint/no-explicit-any": [
74+
"error",
75+
{
76+
"fixToUnknown": true
77+
}
78+
]
79+
}
80+
},
81+
{
82+
"files": ["**/*.stories.@(js|jsx|ts|tsx|mdx)"],
83+
"extends": ["plugin:storybook/recommended"]
84+
}
85+
],
86+
"ignorePatterns": [
87+
"node_modules/",
88+
".next/",
89+
"out/",
90+
"dist/",
91+
"build/",
92+
".vercel/",
93+
".netlify/",
94+
"coverage/",
95+
"storybook-static/",
96+
"**/*.d.ts",
97+
"src/intl/"
98+
]
6899
}

app/[locale]/10years/_components/TenYearGlobe.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const TenYearGlobe = ({ events }: { events: EventData[] }) => {
6161
const b = Math.min(255, Math.floor((basePurple & 0xff) * 1.3))
6262
return `#${r.toString(16).padStart(2, "0")}${g.toString(16).padStart(2, "0")}${b.toString(16).padStart(2, "0")}`
6363
})
64-
}, [countries.features, resolvedTheme])
64+
}, [resolvedTheme])
6565

6666
const hexPolygonColor = (feature: object) => {
6767
const idx = countries.features.indexOf(

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,17 @@
116116
"@types/react": "18.2.57",
117117
"@types/react-dom": "18.2.19",
118118
"@types/xml2js": "^0.4.14",
119-
"@typescript-eslint/eslint-plugin": "^6.19.0",
120-
"@typescript-eslint/parser": "^6.19.0",
119+
"@typescript-eslint/eslint-plugin": "^7.18.0",
120+
"@typescript-eslint/parser": "^7.18.0",
121121
"autoprefixer": "^10.4.19",
122122
"chromatic": "10.9.6",
123123
"decompress": "^4.2.1",
124-
"eslint": "^8.45.0",
124+
"eslint": "^8.57.1",
125125
"eslint-config-next": "^14.2.2",
126-
"eslint-config-prettier": "9.1.0",
126+
"eslint-config-prettier": "^9",
127127
"eslint-plugin-simple-import-sort": "^10.0.0",
128128
"eslint-plugin-storybook": "0.8.0",
129-
"eslint-plugin-unused-imports": "^3.0.0",
129+
"eslint-plugin-unused-imports": "^3.2.0",
130130
"husky": "^9.0.11",
131131
"image-size": "^1.0.2",
132132
"lint-staged": "^15.2.5",

0 commit comments

Comments
 (0)