Skip to content

Commit 2380da9

Browse files
committed
Fixes lint issues
1 parent b842e61 commit 2380da9

File tree

7 files changed

+9
-4
lines changed

7 files changed

+9
-4
lines changed

src/commands/toggleFileAnnotations.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export class ClearFileAnnotationsCommand extends EditorCommand {
2929

3030
// Clear split editors as though they were linked, because we can't handle the command states effectively
3131
await Promise.allSettled(
32+
// eslint-disable-next-line @typescript-eslint/await-thenable
3233
[editor, ...getOtherVisibleTextEditors(editor)].map(e => this.container.fileAnnotations.clear(e)),
3334
);
3435
} catch (ex) {

src/git/remotes/remoteProvider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ export abstract class RemoteProvider<T extends ResourceDescriptor = ResourceDesc
234234
} else {
235235
urlPromises.push(this.url(resource));
236236
}
237+
// eslint-disable-next-line @typescript-eslint/await-thenable
237238
const urls: string[] = (await Promise.allSettled(urlPromises))
238239
.map(r => getSettledValue(r))
239240
.filter(r => r != null);

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
},

src/system/promise.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ export function getDeferredPromiseIfPending<T>(deferred: Deferred<T> | undefined
200200
export type MaybePromiseArr<T> = (Promise<T | undefined> | T | undefined)[];
201201

202202
export async function nonnullSettled<T>(arr: MaybePromiseArr<T>): Promise<T[]> {
203+
// eslint-disable-next-line @typescript-eslint/await-thenable
203204
const all = await Promise.allSettled(arr);
204205
return all.map(r => getSettledValue(r)).filter(v => v != null);
205206
}
@@ -450,6 +451,7 @@ export async function pauseOnCancelOrTimeoutMapTuple<Id, T, U extends unknown[]>
450451
}
451452

452453
const results = await Promise.all(
454+
// eslint-disable-next-line @typescript-eslint/await-thenable
453455
map(source, ([id, [promise, ...rest]]) =>
454456
promise == null
455457
? ([id, [undefined, ...rest]] as const)

src/views/nodes/lineHistoryNode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ export class LineHistoryNode
8181
this.getLog(selection),
8282
sha == null || isUncommitted(sha)
8383
? this.editorContents
84-
? await this.view.container.git.getBlameForRangeContents(this.uri, selection, this.editorContents)
85-
: await this.view.container.git.getBlameForRange(this.uri, selection)
84+
? this.view.container.git.getBlameForRangeContents(this.uri, selection, this.editorContents)
85+
: this.view.container.git.getBlameForRange(this.uri, selection)
8686
: undefined,
8787
svc.getBranchesAndTagsTipsLookup(this.branch?.name),
8888
range ? svc.commits.getLogShas(range, { limit: 0 }) : undefined,

src/views/viewCommands.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export class ViewCommands implements Disposable {
144144
if (selection.length === 0) return;
145145

146146
const data = join(
147+
// eslint-disable-next-line @typescript-eslint/await-thenable
147148
filterMap(await Promise.allSettled(map(selection, n => n.toClipboard?.(type))), r =>
148149
r.status === 'fulfilled' && r.value?.trim() ? r.value : undefined,
149150
),
@@ -167,6 +168,7 @@ export class ViewCommands implements Disposable {
167168
if (!selection.length) return;
168169

169170
const urls = [
171+
// eslint-disable-next-line @typescript-eslint/await-thenable
170172
...filterMap(await Promise.allSettled(map(selection, n => n.getUrl?.())), r =>
171173
r.status === 'fulfilled' && r.value?.trim() ? r.value : undefined,
172174
),

src/webviews/home/homeWebview.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,6 +1208,7 @@ export class HomeWebviewProvider implements WebviewProvider<State, State, HomeWe
12081208
} satisfies IntegrationState;
12091209
});
12101210

1211+
// eslint-disable-next-line @typescript-eslint/await-thenable
12111212
const integrationsResults = await Promise.allSettled(promises);
12121213
const integrations: IntegrationState[] = [...filterMap(integrationsResults, r => getSettledValue(r))];
12131214

0 commit comments

Comments
 (0)