From b057bc9b61202e05bb8fd7d6f420342c7d556c71 Mon Sep 17 00:00:00 2001 From: Yaacov Rydzinski Date: Tue, 13 Dec 2022 06:24:58 +0200 Subject: [PATCH] enable promise/param-names --- .eslintrc.yml | 2 +- src/execution/__tests__/executor-test.ts | 2 +- src/execution/flattenAsyncIterable.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 9c5940716ec..904c1e2046a 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -194,7 +194,7 @@ rules: promise/no-promise-in-callback: off promise/no-return-in-finally: error promise/no-return-wrap: error - promise/param-names: off + promise/param-names: error promise/prefer-await-to-callbacks: off promise/prefer-await-to-then: error promise/valid-params: error diff --git a/src/execution/__tests__/executor-test.ts b/src/execution/__tests__/executor-test.ts index a945b4d0b56..3642b7dfb42 100644 --- a/src/execution/__tests__/executor-test.ts +++ b/src/execution/__tests__/executor-test.ts @@ -419,7 +419,7 @@ describe('Execute: Handles basic execution tasks', () => { return new Promise((resolve) => resolve('async')); }, asyncReject() { - return new Promise((_, reject) => + return new Promise((_resolve, reject) => reject(new Error('Error getting asyncReject')), ); }, diff --git a/src/execution/flattenAsyncIterable.ts b/src/execution/flattenAsyncIterable.ts index 22bdb023387..456eff2a8a3 100644 --- a/src/execution/flattenAsyncIterable.ts +++ b/src/execution/flattenAsyncIterable.ts @@ -38,8 +38,8 @@ export function flattenAsyncIterable( } // Nobody else is getting it. We should! let resolve: () => void; - waitForCurrentNestedIterator = new Promise((r) => { - resolve = r; + waitForCurrentNestedIterator = new Promise((_resolve) => { + resolve = _resolve; }); const topIteratorResult = await topIterator.next(); if (topIteratorResult.done) {