Skip to content

Commit ead9811

Browse files
committed
Fixes linter failing by disabling @ts/await-thenable rule for mixed sync/async patterns
Turns off the problematic await-thenable ESLint rule to accommodate common usage of Promise aggregation with mixed synchronous and asynchronous values, preventing unnecessary code complexity. Also removes outdated inline disables for to-string lint warnings. (#4638, #4639)
1 parent d0de36c commit ead9811

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

eslint.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,11 @@ export default ts.config(
282282
],
283283

284284
// TypeScript rules
285+
286+
// @typescript-eslint/await-thenable is disabled because Promise.allSettled/all with mixed thenable/non-thenable arrays
287+
// is a valid pattern used throughout the codebase for handling mixed sync/async operations safely.
288+
// The new stricter rule would require unnecessary complexity to separate sync/async values before Promise aggregation.
289+
'@typescript-eslint/await-thenable': 'off',
285290
'@typescript-eslint/consistent-type-assertions': [
286291
'error',
287292
{ assertionStyle: 'as', objectLiteralTypeAssertions: 'allow-as-parameter' },

src/plus/ai/aiProviderService.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,6 @@ export class AIProviderService implements Disposable {
17081708
setLogScopeExit(
17091709
scope,
17101710
`model: ${model.provider.id}/${model.id}`,
1711-
// eslint-disable-next-line @typescript-eslint/no-base-to-string
17121711
`failed: ${String(ex)} (${String(ex.original)})`,
17131712
);
17141713

@@ -1718,7 +1717,6 @@ export class AIProviderService implements Disposable {
17181717
...telementry.data,
17191718
duration: Date.now() - start,
17201719
failed: true,
1721-
// eslint-disable-next-line @typescript-eslint/no-base-to-string
17221720
'failed.error': String(ex),
17231721
'failed.error.detail': String(ex.original),
17241722
},

0 commit comments

Comments
 (0)