diff --git a/packages/configs/src/lint/rules/base.ts b/packages/configs/src/lint/rules/base.ts index 708a51a5..de63eef2 100644 --- a/packages/configs/src/lint/rules/base.ts +++ b/packages/configs/src/lint/rules/base.ts @@ -110,6 +110,8 @@ export function getBaseConfig(packageName: string, forceCache = !CI_environment, 'unicorn/explicit-length-check': 'off', 'unicorn/comment-content': 'off', 'unicorn/no-top-level-side-effects': 'off', + 'unicorn/name-replacements': 'off', + 'unicorn/consistent-boolean-name': 'off', '@stylistic/padding-line-between-statements': [ 'error', // Always require blank lines after import, except between imports diff --git a/packages/shared/src/universal/promises.ts b/packages/shared/src/universal/promises.ts index 23bc0c62..48ecb6cb 100644 --- a/packages/shared/src/universal/promises.ts +++ b/packages/shared/src/universal/promises.ts @@ -11,11 +11,14 @@ export class PromiseQueue { return new Promise((resolve, reject) => { const run = () => { this.activeCount++; - /* eslint-disable promise/prefer-await-to-then, promise/catch-or-return */ - task() - .then(resolve) - .catch(reject) - .finally(() => { + void (async () => { + try { + const result = await task(); + + resolve(result); + } catch (error) { + reject(error instanceof Error ? error : new Error(String(error))); + } finally { this.activeCount--; const next = this.queue.shift(); @@ -23,8 +26,8 @@ export class PromiseQueue { if (next) { next(); } - }); - /* eslint-enable promise/prefer-await-to-then, promise/catch-or-return */ + } + })(); }; if (this.activeCount < this.concurrency) {