style(eslint): fix no-unassigned-vars no-useless-assignment preserve-caught-error (#21175)

* fix: fix no-unassigned-vars

* fix: fix preserve-caught-error

* fix: fix no-useless-assignment

* fix: update variable types for better type safety

* fix: replace nullish coalescing with logical OR for limit assignment

* fix: add DataItem type import for better type safety
This commit is contained in:
Tony
2026-02-18 22:25:14 +08:00
committed by GitHub
parent 24787cc7e9
commit ba0f1ad292
197 changed files with 271 additions and 472 deletions
+1 -3
View File
@@ -19,9 +19,7 @@ export const handler = async (ctx: Context): Promise<Data> => {
const $: CheerioAPI = load(response);
const language = $('html').attr('lang') ?? 'en';
let items: DataItem[] = [];
items = $('div.active-release-list-widget ol.list-row-container li')
let items: DataItem[] = $('div.active-release-list-widget ol.list-row-container li')
.slice(0, limit)
.toArray()
.map((el): Element => {