From 127f13836f8235e512949e74a3afa51ab2227ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Fern=C3=A1ndez?= Date: Mon, 6 Jul 2026 14:58:56 +0000 Subject: [PATCH] chore: disable aggressive unicorn rules, manual fix for promise-related errors Signed-off-by: GitHub --- packages/configs/src/lint/rules/base.ts | 2 ++ packages/shared/src/universal/promises.ts | 17 ++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) 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) {