mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 15:36:49 +08:00
es lint fix
This commit is contained in:
@@ -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] = [])
|
||||
|
||||
Reference in New Issue
Block a user