代码格式化: prettier --write 统一代码风格
39 个文件按 .prettierrc.json (printWidth 100 / no semi / singleQuote) 统一格式, 纯空白与换行调整, 无逻辑变更。为接入代码门禁做准备, 让 npm run check (format:check + lint:strict + typecheck) 干净通过。
This commit is contained in:
@@ -88,9 +88,7 @@ function readItems(key: string): ListingCollectionItem[] {
|
||||
if (!raw) return []
|
||||
const parsed = JSON.parse(raw) as unknown
|
||||
if (!Array.isArray(parsed)) return []
|
||||
return parsed
|
||||
.map(normalizeItem)
|
||||
.filter((item): item is ListingCollectionItem => Boolean(item))
|
||||
return parsed.map(normalizeItem).filter((item): item is ListingCollectionItem => Boolean(item))
|
||||
} catch {
|
||||
localStorage.removeItem(key)
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user