es lint fix

This commit is contained in:
thofx
2023-07-22 16:09:07 +08:00
parent 48749b29fe
commit 018778488a
80 changed files with 3994 additions and 2981 deletions
+7 -3
View File
@@ -250,6 +250,7 @@ const target = join(__dirname, 'icons-bundle.js');
// Export to JSON
const content = iconSet.export()
bundle += `addCollection(${JSON.stringify(content)});\n`
}
}
@@ -258,7 +259,7 @@ const target = join(__dirname, 'icons-bundle.js');
await fs.writeFile(target, bundle, 'utf8')
console.log(`Saved ${target} (${bundle.length} bytes)`)
})().catch(err => {
})().catch((err) => {
console.error(err)
})
@@ -274,7 +275,8 @@ function removeMetaData(iconSet: IconifyJSON) {
'prefixes',
'suffixes',
]
props.forEach(prop => {
props.forEach((prop) => {
delete iconSet[prop]
})
}
@@ -284,12 +286,14 @@ function removeMetaData(iconSet: IconifyJSON) {
*/
function organizeIconsList(icons: string[]): Record<string, string[]> {
const sorted: Record<string, string[]> = Object.create(null)
icons.forEach(icon => {
icons.forEach((icon) => {
const item = stringToIcon(icon)
if (!item)
return
const prefix = item.prefix
const prefixList = sorted[prefix]
? sorted[prefix]
: (sorted[prefix] = [])