chore: disable aggressive unicorn rules, manual fix for promise-related errors

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Fernando Fernández
2026-07-06 17:05:06 +02:00
parent 42742f3e79
commit 127f13836f
2 changed files with 12 additions and 7 deletions
+2
View File
@@ -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
+10 -7
View File
@@ -11,11 +11,14 @@ export class PromiseQueue {
return new Promise<T>((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) {