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:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user