refactor(eslint): add back no-return-await (#11877)

* chore: add back no-return-await

* chore: fix action warning

* chore: fix all no-return-await
This commit is contained in:
Tony
2023-02-15 21:30:05 +01:00
committed by GitHub
parent ae3bccdf2a
commit 589ddb3a43
73 changed files with 473 additions and 495 deletions

View File

@@ -187,9 +187,9 @@ const normalizeUrl = (url, bypassHostCheck = false) => {
* @param {boolean} bypassHostCheck - Whether to bypass host check.
* @return {Promise<object>} - An object containing the article and its metadata.
*/
const fetchArticle = async (ctx, url, bypassHostCheck = false) => {
const fetchArticle = (ctx, url, bypassHostCheck = false) => {
url = normalizeUrl(url, bypassHostCheck);
return await ctx.cache.tryGet(url, async () => {
return ctx.cache.tryGet(url, async () => {
const response = await got(url);
const $ = cheerio.load(response.data);