Fix @typescript-eslint/no-unsafe-return errors
This commit is contained in:
parent
c347ce8483
commit
e266dd00f2
15 changed files with 41 additions and 16 deletions
|
|
@ -1,3 +1,5 @@
|
|||
// eslint-disable-next-line eslint-comments/disable-enable-pair
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
import got from 'got';
|
||||
|
|
|
|||
|
|
@ -84,8 +84,9 @@ const lsRemote = (pattern?: string) => {
|
|||
const URL = `https://api.npms.io/v2/search?q=${
|
||||
(pattern && `${pattern}+`) || ''
|
||||
}keywords:hyper-plugin,hyper-theme&size=250`;
|
||||
type npmResult = {package: {name: string; description: string}};
|
||||
return got(URL)
|
||||
.then((response) => JSON.parse(response.body).results as any[])
|
||||
.then((response) => JSON.parse(response.body).results as npmResult[])
|
||||
.then((entries) => entries.map((entry) => entry.package))
|
||||
.then((entries) =>
|
||||
entries.map(({name, description}) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue