refactor: use js-yaml to parse both JSON and YAML (#5806)

This commit is contained in:
Joshua Chen 2021-11-04 00:55:14 +08:00 committed by GitHub
parent 9f13f8f7af
commit 1363a25819
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 35 deletions

View file

@ -313,7 +313,6 @@ export async function mapAsyncSequencial<T extends unknown, R extends unknown>(
const results: R[] = [];
// eslint-disable-next-line no-restricted-syntax
for (const t of array) {
// eslint-disable-next-line no-await-in-loop
const result = await action(t);
results.push(result);
}
@ -326,7 +325,6 @@ export async function findAsyncSequential<T>(
): Promise<T | undefined> {
// eslint-disable-next-line no-restricted-syntax
for (const t of array) {
// eslint-disable-next-line no-await-in-loop
if (await predicate(t)) {
return t;
}