chore(deps-dev): bump eslint-plugin-unicorn from 59.0.1 to 60.0.0 (#19662)

* chore(deps-dev): bump eslint-plugin-unicorn from 59.0.1 to 60.0.0

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-version: 60.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* refactor: replace reverse() with toReversed() for improved readability

* chore: update packageManager version to pnpm@10.13.1

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2025-07-22 20:45:42 +08:00 committed by GitHub
parent 5f59a85acf
commit ae3e646ea9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 64 additions and 59 deletions

View File

@ -89,7 +89,7 @@ async function handler(ctx) {
})
)
);
results = results.reverse();
results = results.toReversed();
}
return {

View File

@ -44,7 +44,7 @@ async function handler(ctx) {
link: a.attr('href').replace('http://', 'https://'),
};
})
.reverse();
.toReversed();
return {
title: `AGE动漫 - ${ldJson.name}`,

View File

@ -61,6 +61,6 @@ async function handler() {
return {
title: $('title').text(),
link: url,
item: result.reverse(),
item: result.toReversed(),
};
}

View File

@ -62,7 +62,7 @@ async function handler(ctx) {
danmakuList.push({ p: $(item).attr('p'), text: $(item).text() });
});
danmakuList = danmakuList.reverse().slice(0, limit);
danmakuList = danmakuList.toReversed().slice(0, limit);
return {
title: `${videoName} 的 弹幕动态`,

View File

@ -58,7 +58,7 @@ async function handler(ctx) {
let items = $('dl dd a')
.toArray()
.reverse()
.toReversed()
.slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 1)
.map((item) => {
item = $(item);

View File

@ -83,7 +83,7 @@ async function handler(ctx) {
pages: item.next('font').text().match(/\d+/)[0],
};
})
.reverse();
.toReversed();
const chapters = await getChapters(id, list, cache.tryGet);

View File

@ -30,7 +30,7 @@ const handler = async (ctx) => {
const list = $('#detail-list-select > li > a')
.toArray()
.reverse()
.toReversed()
.slice(0, limit)
.map((item) => {
const $item = $(item);

View File

@ -61,7 +61,7 @@ async function handler(ctx) {
},
});
const data = response.data.data.repository.stargazers.edges.reverse();
const data = response.data.data.repository.stargazers.edges.toReversed();
return {
allowEmpty: true,

View File

@ -48,6 +48,6 @@ async function handler(ctx) {
link: item.find('.cept-tt').attr('href'),
};
})
.reverse(),
.toReversed(),
};
}

View File

@ -47,7 +47,7 @@ async function handler(ctx) {
const items = await SourceMapConsumer.with(response, null, (consumer) =>
consumer.sources
.filter((s) => /routes\/essays/.test(s))
.reverse()
.toReversed()
.slice(0, limit)
.map((item) => {
const source = consumer.sourceContentFor(item).replaceAll(/\s\n/g, '');

View File

@ -20,7 +20,7 @@ const getChapters = ($) => {
if (!nextEle) {
return;
}
for (const ul of $(nextEle).children('ul').toArray().reverse()) {
for (const ul of $(nextEle).children('ul').toArray().toReversed()) {
for (const li of $(ul).children('li').toArray()) {
const a = $(li).children('a');
// 通过操作发布时间来对章节进行排序,如果是刚刚更新的单行本或者番外,保留最新更新时间

View File

@ -47,7 +47,7 @@ async function handler(ctx) {
link: `${rootUrl}${a.attr('href')}`,
};
})
.reverse();
.toReversed();
return {
title: `NT动漫 - ${dmtitle}`,
link: `${rootUrl}/video/${id}.html`,

View File

@ -57,7 +57,7 @@ export async function getSFWSeriesNovels(seriesId: string, limit: number = 10):
category: novelContent.tags,
};
})
.reverse()
.toReversed()
);
return {

View File

@ -54,7 +54,7 @@ async function handler(ctx) {
let items = $('item')
.slice(-limit)
.toArray()
.reverse()
.toReversed()
.map((item) => {
item = $(item);

View File

@ -72,7 +72,7 @@ async function handler(ctx: Context): Promise<Data> {
const item = await fetchChapterContent(chapterUrl, chapterNumber);
return item;
}).reverse()
}).toReversed()
);
return {

View File

@ -752,6 +752,6 @@ async function handler(ctx) {
};
})
.filter(Boolean)
.reverse(),
.toReversed(),
};
}

View File

@ -36,7 +36,7 @@ async function handler(ctx) {
description: seasonDetails.overview.trim(),
image: `https://image.tmdb.org/t/p/original${seasonDetails.poster_path}`,
link: `https://www.themoviedb.org/tv/${tvShowDetails.id}/season/${seasonDetails.season_number}`,
item: seasonDetails.episodes.reverse().map((item) => ({
item: seasonDetails.episodes.toReversed().map((item) => ({
title: `${item.episode_number} ${item.name}`,
link: `https://www.themoviedb.org/tv/${tvShowDetails.id}/season/${item.season_number}/episode/${item.episode_number}`,
description: handleDescription(item),

View File

@ -97,7 +97,7 @@ async function handler(ctx) {
const monitors = {};
const items = rss.items.reverse().map((item) => {
const items = rss.items.toReversed().map((item) => {
const titleMatch = item.title.match(titleRegex);
if (!titleMatch) {
throw new InvalidParameterError('Unexpected title, please open an issue.');

View File

@ -69,7 +69,7 @@ export async function handler(ctx) {
? ''
: firstResponse
.match(/'([\w./=?]+)'/g)
.reverse()
.toReversed()
.join('')
.replaceAll("'", ''),
rootUrl

View File

@ -69,7 +69,7 @@ async function handler(ctx) {
guid: `${currentUrl}#${title}`,
};
})
.reverse();
.toReversed();
return {
title: `${$('.content-page-title').text()} - FIX字幕侠`,

View File

@ -50,7 +50,7 @@ export function parseDuration(timeStr: string) {
const clean = timeStr.trim().replaceAll(/[^\d:]/g, '');
return clean
.split(':')
.reverse()
.toReversed()
.reduce((total, part, idx) => {
const n = Number(part);
if (Number.isNaN(n)) {

View File

@ -176,7 +176,7 @@
"eslint-nibble": "8.1.0",
"eslint-plugin-n": "17.21.0",
"eslint-plugin-prettier": "5.5.3",
"eslint-plugin-unicorn": "59.0.1",
"eslint-plugin-unicorn": "60.0.0",
"eslint-plugin-yml": "1.18.0",
"fs-extra": "11.3.0",
"globals": "16.3.0",
@ -198,7 +198,7 @@
"vitest": "2.1.9",
"yaml-eslint-parser": "1.3.0"
},
"packageManager": "pnpm@10.12.2+sha512.a32540185b964ee30bb4e979e405adc6af59226b438ee4cc19f9e8773667a66d302f5bfee60a39d3cac69e35e4b96e708a71dd002b7e9359c4112a1722ac323f",
"packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad",
"engines": {
"node": ">=22"
},

View File

@ -412,8 +412,8 @@ importers:
specifier: 5.5.3
version: 5.5.3(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@9.31.0(jiti@2.4.2)))(eslint@9.31.0(jiti@2.4.2))(prettier@3.6.2)
eslint-plugin-unicorn:
specifier: 59.0.1
version: 59.0.1(eslint@9.31.0(jiti@2.4.2))
specifier: 60.0.0
version: 60.0.0(eslint@9.31.0(jiti@2.4.2))
eslint-plugin-yml:
specifier: 1.18.0
version: 1.18.0(eslint@9.31.0(jiti@2.4.2))
@ -1408,10 +1408,6 @@ packages:
resolution: {integrity: sha512-ViuymvFmcJi04qdZeDc2whTHryouGcDlaxPqarTD0ZE10ISpxGUVZGZDx4w01upyIynL3iu6IXH2bS1NhclQMw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/core@0.13.0':
resolution: {integrity: sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/core@0.15.1':
resolution: {integrity: sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@ -1436,14 +1432,14 @@ packages:
resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/plugin-kit@0.2.8':
resolution: {integrity: sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/plugin-kit@0.3.3':
resolution: {integrity: sha512-1+WqvgNMhmlAambTvT3KPtCl/Ibr68VldY2XY40SL1CE0ZXiakFR/cbTspaF5HsnpDMvcYYoJHfl4980NBjGag==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/plugin-kit@0.3.4':
resolution: {integrity: sha512-Ul5l+lHEcw3L5+k8POx6r74mxEYKG5kOb6Xpy2gCRW6zweT6TEhAf8vhxGgjhqrd/VO/Dirhsb+1hNpD1ue9hw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@hono/node-server@1.17.1':
resolution: {integrity: sha512-SY79W/C+2b1MyAzmIcV32Q47vO1b5XwLRwj8S9N6Jr5n1QCkIfAIH6umOSgqWZ4/v67hg6qq8Ha5vZonVidGsg==}
engines: {node: '>=18.14.1'}
@ -2812,8 +2808,8 @@ packages:
resolution: {integrity: sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==}
engines: {node: '>=16'}
caniuse-lite@1.0.30001726:
resolution: {integrity: sha512-VQAUIUzBiZ/UnlM28fSp2CRF3ivUn1BWEvxMcVTNwpw91Py1pGbPIyIKtd+tzct9C3ouceCVdGAXxZOpZAsgdw==}
caniuse-lite@1.0.30001727:
resolution: {integrity: sha512-pB68nIHmbN6L/4C6MH1DokyR3bYqFwjaSs/sWDHGj4CTcFtQUQMuJftVwWkXq7mNWOybD3KhUv3oWHoGxgP14Q==}
caseless@0.12.0:
resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==}
@ -2841,6 +2837,9 @@ packages:
chance@1.1.13:
resolution: {integrity: sha512-V6lQCljcLznE7tUYUM9EOAnnKXbctE6j/rdQkYOHIWbfGQbrzTsAXNW9CdU5XCo4ArXQCj/rb6HgxPlmGJcaUg==}
change-case@5.4.4:
resolution: {integrity: sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==}
character-entities@2.0.2:
resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==}
@ -2875,8 +2874,8 @@ packages:
peerDependencies:
devtools-protocol: '*'
ci-info@4.2.0:
resolution: {integrity: sha512-cYY9mypksY8NRqgDB1XD1RiJL338v/551niynFTGkZOO2LHuB2OmOYxDIe/ttN9AHwrqdum1360G3ald0W9kCg==}
ci-info@4.3.0:
resolution: {integrity: sha512-l+2bNRMiQgcfILUi33labAZYIWlH1kWDp+ecNo5iisRKrbm0xcRyCww71/YU0Fkw0mAFpz9bJayXPjey6vkmaQ==}
engines: {node: '>=8'}
city-timezones@1.3.1:
@ -3002,6 +3001,9 @@ packages:
core-js-compat@3.43.0:
resolution: {integrity: sha512-2GML2ZsCc5LR7hZYz4AXmjQw8zuy2T//2QntwdnpuYI7jteT6GVYJL7F6C2C57R7gSYrcqVW3lAALefdbhBLDA==}
core-js-compat@3.44.0:
resolution: {integrity: sha512-JepmAj2zfl6ogy34qfWtcE7nHKAJnKsQFRn++scjVS2bZFllwptzw61BZcZFYBPpUznLfAvh0LGhxKppk04ClA==}
core-js@2.6.12:
resolution: {integrity: sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==}
deprecated: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
@ -3261,8 +3263,8 @@ packages:
engines: {node: '>=14'}
hasBin: true
electron-to-chromium@1.5.179:
resolution: {integrity: sha512-UWKi/EbBopgfFsc5k61wFpV7WrnnSlSzW/e2XcBmS6qKYTivZlLtoll5/rdqRTxGglGHkmkW0j0pFNJG10EUIQ==}
electron-to-chromium@1.5.189:
resolution: {integrity: sha512-y9D1ntS1ruO/pZ/V2FtLE+JXLQe28XoRpZ7QCCo0T8LdQladzdcOVQZH/IWLVJvCw12OGMb6hYOeOAjntCmJRQ==}
ellipsize@0.1.0:
resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==}
@ -3432,11 +3434,11 @@ packages:
eslint-config-prettier:
optional: true
eslint-plugin-unicorn@59.0.1:
resolution: {integrity: sha512-EtNXYuWPUmkgSU2E7Ttn57LbRREQesIP1BiLn7OZLKodopKfDXfBUkC/0j6mpw2JExwf43Uf3qLSvrSvppgy8Q==}
engines: {node: ^18.20.0 || ^20.10.0 || >=21.0.0}
eslint-plugin-unicorn@60.0.0:
resolution: {integrity: sha512-QUzTefvP8stfSXsqKQ+vBQSEsXIlAiCduS/V1Em+FKgL9c21U/IIm20/e3MFy1jyCf14tHAhqC1sX8OTy6VUCg==}
engines: {node: ^20.10.0 || >=21.0.0}
peerDependencies:
eslint: '>=9.22.0'
eslint: '>=9.29.0'
eslint-plugin-yml@1.18.0:
resolution: {integrity: sha512-9NtbhHRN2NJa/s3uHchO3qVVZw0vyOIvWlXWGaKCr/6l3Go62wsvJK5byiI6ZoYztDsow4GnS69BZD3GnqH3hA==}
@ -7117,10 +7119,6 @@ snapshots:
'@eslint/config-helpers@0.3.0': {}
'@eslint/core@0.13.0':
dependencies:
'@types/json-schema': 7.0.15
'@eslint/core@0.15.1':
dependencies:
'@types/json-schema': 7.0.15
@ -7159,12 +7157,12 @@ snapshots:
'@eslint/object-schema@2.1.6': {}
'@eslint/plugin-kit@0.2.8':
'@eslint/plugin-kit@0.3.3':
dependencies:
'@eslint/core': 0.13.0
'@eslint/core': 0.15.1
levn: 0.4.1
'@eslint/plugin-kit@0.3.3':
'@eslint/plugin-kit@0.3.4':
dependencies:
'@eslint/core': 0.15.1
levn: 0.4.1
@ -8600,8 +8598,8 @@ snapshots:
browserslist@4.25.1:
dependencies:
caniuse-lite: 1.0.30001726
electron-to-chromium: 1.5.179
caniuse-lite: 1.0.30001727
electron-to-chromium: 1.5.189
node-releases: 2.0.19
update-browserslist-db: 1.1.3(browserslist@4.25.1)
@ -8663,7 +8661,7 @@ snapshots:
camelcase@8.0.0: {}
caniuse-lite@1.0.30001726: {}
caniuse-lite@1.0.30001727: {}
caseless@0.12.0: {}
@ -8698,6 +8696,8 @@ snapshots:
chance@1.1.13: {}
change-case@5.4.4: {}
character-entities@2.0.2: {}
chardet@0.7.0: {}
@ -8758,7 +8758,7 @@ snapshots:
mitt: 3.0.1
zod: 3.25.76
ci-info@4.2.0: {}
ci-info@4.3.0: {}
city-timezones@1.3.1:
dependencies:
@ -8871,6 +8871,10 @@ snapshots:
dependencies:
browserslist: 4.25.1
core-js-compat@3.44.0:
dependencies:
browserslist: 4.25.1
core-js@2.6.12: {}
core-util-is@1.0.2: {}
@ -9109,7 +9113,7 @@ snapshots:
minimatch: 9.0.1
semver: 7.7.2
electron-to-chromium@1.5.179: {}
electron-to-chromium@1.5.189: {}
ellipsize@0.1.0: {}
@ -9326,14 +9330,15 @@ snapshots:
'@types/eslint': 9.6.1
eslint-config-prettier: 10.1.8(eslint@9.31.0(jiti@2.4.2))
eslint-plugin-unicorn@59.0.1(eslint@9.31.0(jiti@2.4.2)):
eslint-plugin-unicorn@60.0.0(eslint@9.31.0(jiti@2.4.2)):
dependencies:
'@babel/helper-validator-identifier': 7.27.1
'@eslint-community/eslint-utils': 4.7.0(eslint@9.31.0(jiti@2.4.2))
'@eslint/plugin-kit': 0.2.8
ci-info: 4.2.0
'@eslint/plugin-kit': 0.3.4
change-case: 5.4.4
ci-info: 4.3.0
clean-regexp: 1.0.0
core-js-compat: 3.43.0
core-js-compat: 3.44.0
eslint: 9.31.0(jiti@2.4.2)
esquery: 1.6.0
find-up-simple: 1.0.1