From fcf79fd3df914d756fc6e39577fe48f01e69bf4e Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Fri, 28 Aug 2026 14:33:43 +0200 Subject: [PATCH] fix(build): fix generateNextJSAliases typescript eslint type error and revert malformed metadata file aliases --- icons/arrow-down-0-1.json | 3 +-- icons/arrow-down-1-0.json | 3 +-- icons/arrow-down-a-z.json | 3 +-- icons/arrow-down-z-a.json | 3 +-- icons/arrow-up-0-1.json | 3 +-- icons/arrow-up-1-0.json | 3 +-- icons/arrow-up-a-z.json | 3 +-- icons/arrow-up-z-a.json | 3 +-- icons/axis-3d.json | 3 +-- icons/file-axis-3d.json | 3 +-- icons/grid-2x2-check.json | 3 +-- icons/grid-2x2-plus.json | 3 +-- icons/grid-2x2-x.json | 3 +-- icons/grid-2x2.json | 3 +-- icons/grid-3x2.json | 3 --- icons/grid-3x3.json | 3 +-- icons/move-3d.json | 3 +-- icons/rotate-3d.json | 3 +-- icons/scale-3d.json | 3 +-- scripts/generateNextJSAliases.mts | 11 +++++++++-- 20 files changed, 27 insertions(+), 41 deletions(-) diff --git a/icons/arrow-down-0-1.json b/icons/arrow-down-0-1.json index 54e722845..a2f90b046 100644 --- a/icons/arrow-down-0-1.json +++ b/icons/arrow-down-0-1.json @@ -26,7 +26,6 @@ "name": "arrow-down-01", "deprecationReason": "alias.name", "deprecated": true - }, - "arrow-down-01" + } ] } diff --git a/icons/arrow-down-1-0.json b/icons/arrow-down-1-0.json index 58b32af01..9930a1091 100644 --- a/icons/arrow-down-1-0.json +++ b/icons/arrow-down-1-0.json @@ -26,7 +26,6 @@ "name": "arrow-down-10", "deprecationReason": "alias.name", "deprecated": true - }, - "arrow-down-10" + } ] } diff --git a/icons/arrow-down-a-z.json b/icons/arrow-down-a-z.json index 00c9ec8ad..d29a21d5a 100644 --- a/icons/arrow-down-a-z.json +++ b/icons/arrow-down-a-z.json @@ -26,7 +26,6 @@ "name": "arrow-down-az", "deprecationReason": "alias.name", "deprecated": true - }, - "arrow-down-az" + } ] } diff --git a/icons/arrow-down-z-a.json b/icons/arrow-down-z-a.json index d0dfcb1d2..e34e3634d 100644 --- a/icons/arrow-down-z-a.json +++ b/icons/arrow-down-z-a.json @@ -27,7 +27,6 @@ "name": "arrow-down-za", "deprecationReason": "alias.name", "deprecated": true - }, - "arrow-down-za" + } ] } diff --git a/icons/arrow-up-0-1.json b/icons/arrow-up-0-1.json index 5510e288a..786bf4e70 100644 --- a/icons/arrow-up-0-1.json +++ b/icons/arrow-up-0-1.json @@ -26,7 +26,6 @@ "name": "arrow-up-01", "deprecationReason": "alias.name", "deprecated": true - }, - "arrow-up-01" + } ] } diff --git a/icons/arrow-up-1-0.json b/icons/arrow-up-1-0.json index 15f754e12..328c2c5bd 100644 --- a/icons/arrow-up-1-0.json +++ b/icons/arrow-up-1-0.json @@ -26,7 +26,6 @@ "name": "arrow-up-10", "deprecationReason": "alias.name", "deprecated": true - }, - "arrow-up-10" + } ] } diff --git a/icons/arrow-up-a-z.json b/icons/arrow-up-a-z.json index 340081226..1dcff0f8e 100644 --- a/icons/arrow-up-a-z.json +++ b/icons/arrow-up-a-z.json @@ -26,7 +26,6 @@ "name": "arrow-up-az", "deprecationReason": "alias.name", "deprecated": true - }, - "arrow-up-az" + } ] } diff --git a/icons/arrow-up-z-a.json b/icons/arrow-up-z-a.json index 3277961fc..53799ce63 100644 --- a/icons/arrow-up-z-a.json +++ b/icons/arrow-up-z-a.json @@ -27,7 +27,6 @@ "name": "arrow-up-za", "deprecationReason": "alias.name", "deprecated": true - }, - "arrow-up-za" + } ] } diff --git a/icons/axis-3d.json b/icons/axis-3d.json index 7a115d009..1d95cd342 100644 --- a/icons/axis-3d.json +++ b/icons/axis-3d.json @@ -17,7 +17,6 @@ "name": "axis-3-d", "deprecationReason": "alias.name", "deprecated": true - }, - "axis-3-d" + } ] } diff --git a/icons/file-axis-3d.json b/icons/file-axis-3d.json index 7ef73fa2d..1f512a43c 100644 --- a/icons/file-axis-3d.json +++ b/icons/file-axis-3d.json @@ -20,7 +20,6 @@ "name": "file-axis-3-d", "deprecationReason": "alias.name", "deprecated": true - }, - "file-axis-3-d" + } ] } diff --git a/icons/grid-2x2-check.json b/icons/grid-2x2-check.json index 71b509e58..a89d0e213 100644 --- a/icons/grid-2x2-check.json +++ b/icons/grid-2x2-check.json @@ -33,7 +33,6 @@ "name": "grid-2-x-2-check", "deprecationReason": "alias.name", "deprecated": true - }, - "grid-2-x-2-check" + } ] } diff --git a/icons/grid-2x2-plus.json b/icons/grid-2x2-plus.json index 8bdc4e8a0..32835a7dd 100644 --- a/icons/grid-2x2-plus.json +++ b/icons/grid-2x2-plus.json @@ -34,7 +34,6 @@ "name": "grid-2-x-2-plus", "deprecationReason": "alias.name", "deprecated": true - }, - "grid-2-x-2-plus" + } ] } diff --git a/icons/grid-2x2-x.json b/icons/grid-2x2-x.json index b5f68e433..c84d666cb 100644 --- a/icons/grid-2x2-x.json +++ b/icons/grid-2x2-x.json @@ -33,7 +33,6 @@ "name": "grid-2-x-2-x", "deprecationReason": "alias.name", "deprecated": true - }, - "grid-2-x-2-x" + } ] } diff --git a/icons/grid-2x2.json b/icons/grid-2x2.json index f9d737ab5..2500f7924 100644 --- a/icons/grid-2x2.json +++ b/icons/grid-2x2.json @@ -34,7 +34,6 @@ "name": "grid-2-x-2", "deprecationReason": "alias.name", "deprecated": true - }, - "grid-2-x-2" + } ] } diff --git a/icons/grid-3x2.json b/icons/grid-3x2.json index 231ef918d..32dff9814 100644 --- a/icons/grid-3x2.json +++ b/icons/grid-3x2.json @@ -27,8 +27,5 @@ "math", "layout", "design" - ], - "aliases": [ - "grid-3-x-2" ] } diff --git a/icons/grid-3x3.json b/icons/grid-3x3.json index e632819c2..76b11cc7b 100644 --- a/icons/grid-3x3.json +++ b/icons/grid-3x3.json @@ -28,7 +28,6 @@ "name": "grid-3-x-3", "deprecationReason": "alias.name", "deprecated": true - }, - "grid-3-x-3" + } ] } diff --git a/icons/move-3d.json b/icons/move-3d.json index c4f3b7dad..a969e0e70 100644 --- a/icons/move-3d.json +++ b/icons/move-3d.json @@ -21,7 +21,6 @@ "name": "move-3-d", "deprecationReason": "alias.name", "deprecated": true - }, - "move-3-d" + } ] } diff --git a/icons/rotate-3d.json b/icons/rotate-3d.json index df388f804..9a2ca069d 100644 --- a/icons/rotate-3d.json +++ b/icons/rotate-3d.json @@ -19,7 +19,6 @@ "name": "rotate-3-d", "deprecationReason": "alias.name", "deprecated": true - }, - "rotate-3-d" + } ] } diff --git a/icons/scale-3d.json b/icons/scale-3d.json index a74b38005..4906533f2 100644 --- a/icons/scale-3d.json +++ b/icons/scale-3d.json @@ -20,7 +20,6 @@ "name": "scale-3-d", "deprecationReason": "alias.name", "deprecated": true - }, - "scale-3-d" + } ] } diff --git a/scripts/generateNextJSAliases.mts b/scripts/generateNextJSAliases.mts index bc269106a..1fadf5e7d 100644 --- a/scripts/generateNextJSAliases.mts +++ b/scripts/generateNextJSAliases.mts @@ -37,8 +37,15 @@ Promise.all( const iconMetaData = JSON.parse(metaJson); const aliases = iconMetaData.aliases ?? []; - if (!aliases.includes(iconNameKebabCaseNextjsFlavour)) { - aliases.push(iconNameKebabCaseNextjsFlavour); + const hasAlias = aliases.some((alias: string | { name: string }) => { + if (typeof alias === 'string') { + return alias === iconNameKebabCaseNextjsFlavour; + } + return alias.name === iconNameKebabCaseNextjsFlavour; + }); + + if (!hasAlias) { + aliases.push({ name: iconNameKebabCaseNextjsFlavour }); } let output = JSON.stringify({ ...iconMetaData, aliases }, null, 2);