-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: esm, typescript, replace jest with vitest #14632
Conversation
This reverts commit 310180d.
list.map(async (info) => { | ||
const title = info.title; | ||
const date = info.date; | ||
const itemUrl = url.resolve(link, info.link); |
Check warning
Code scanning / ESLint
disallow deprecated APIs Warning
const response = await got.get(itemUrl); | ||
const $ = load(response.data); | ||
let description = $('.article-box').html(); | ||
description = description ? description.replaceAll('src="', `src="${url.resolve(itemUrl, '.')}`).trim() : $('.content_text').html() || '文章已被删除'; |
Check warning
Code scanning / ESLint
disallow deprecated APIs Warning
const order = ctx.req.param('order') ?? ''; | ||
const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 10; | ||
|
||
const currentUrl = `${rootUrl}${id ? (isNaN(id) ? `/category/${id}` : `/section/${id}`) : ''}`; |
Check warning
Code scanning / ESLint
Prefer `Number` static properties over global ones. Warning
const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 10; | ||
|
||
const currentUrl = `${rootUrl}${id ? (isNaN(id) ? `/category/${id}` : `/section/${id}`) : ''}`; | ||
const apiUrl = `${apiRootUrl}/api${id ? (isNaN(id) ? `/tags/${id}/` : `/forums/${id}/`) : ''}threads?type=${type}&includes=tags,forum_name,summary&ps=${limit}&pg=1&order=${order === '' ? '' : 'time_desc'}&is_groupid=1`; |
Check warning
Code scanning / ESLint
Prefer `Number` static properties over global ones. Warning
url: currentUrl, | ||
}); | ||
|
||
const getProperty = (object, key) => key.split('.').reduce((o, k) => o && o[k], object); |
Check warning
Code scanning / ESLint
Move function definitions to the highest possible scope. Warning
url: currentUrl, | ||
}); | ||
|
||
const getProperty = (object, key) => key.split('.').reduce((o, k) => o && o[k], object); |
Check warning
Code scanning / ESLint
Disallow `Array#reduce()` and `Array#reduceRight()`. Warning
|
||
export default async (ctx) => { | ||
const { category = '' } = ctx.req.param(); | ||
const isArcPost = category && !isNaN(category); // https://www.3dmgame.com/news/\d+/ |
Check warning
Code scanning / ESLint
Prefer `Number` static properties over global ones. Warning
// @ts-nocheck | ||
const getAcwScV2ByArg1 = (arg1) => { | ||
const pwd = '3000176000856006061501533003690027800375'; | ||
const hexXor = function (box, pwd) { |
Check warning
Code scanning / ESLint
Move function definitions to the highest possible scope. Warning
} | ||
return res; | ||
}; | ||
const unsbox = function (str) { |
Check warning
Code scanning / ESLint
Move function definitions to the highest possible scope. Warning
|
||
const rootUrl = `https://${isLocal ? site : 'www'}.6parknews.com`; | ||
const indexUrl = `${rootUrl}${isLocal ? '' : '/newspark'}/index.php`; | ||
const currentUrl = `${indexUrl}${keyword ? `?act=newssearch&app=news&keywords=${keyword}&submit=查询` : id ? (isNaN(id) ? `?act=${id}` : isLocal ? `?type_id=${id}` : `?type=${id}`) : ''}`; |
Check warning
Code scanning / ESLint
Prefer `Number` static properties over global ones. Warning
Involved Issue / 该 PR 相关 Issue
Close #
Example for the Proposed Route(s) / 路由地址示例
New RSS Route Checklist / 新 RSS 路由检查表
Puppeteer
Note / 说明