style: fix eslint issues (#20862)
* style: fix n/no-deprecated-api * style: fix no-useless-escape * style: fix default-case * style: fix unicorn/prefer-string-slice * feat!: remove informedainews the site is gone
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import * as url from 'node:url';
|
||||
|
||||
import type { DataItem, Route } from '@/types';
|
||||
import ofetch from '@/utils/ofetch';
|
||||
|
||||
@@ -39,7 +37,7 @@ async function handler(ctx) {
|
||||
}
|
||||
|
||||
const suffix = 'search?o='.concat(order, '&q=', encodeURIComponent(query), '&s=', sort, '&type=Repositories');
|
||||
const link = url.resolve(host, suffix);
|
||||
const link = new URL(suffix, host).href;
|
||||
const response = await ofetch(link, {
|
||||
headers: {
|
||||
accept: 'application/json',
|
||||
|
||||
@@ -32,7 +32,7 @@ export const route: Route = {
|
||||
| \`o\` | Sorting Order | \`asc\`, \`desc\` |
|
||||
| \`s\` | Sorting Criteria | \`stars\`, \`forks\`, \`updated\` |
|
||||
|
||||
For instance, the \`/github/topics/framework/l=php&o=desc&s=stars\` route will generate the RSS feed corresponding to this [page](https://github.com/topics/framework?l=php\&o=desc\&s=stars).`,
|
||||
For instance, the \`/github/topics/framework/l=php&o=desc&s=stars\` route will generate the RSS feed corresponding to this [page](https://github.com/topics/framework?l=php&o=desc&s=stars).`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
||||
Reference in New Issue
Block a user