Skip to content

Commit a1c4b05

Browse files
committed
fix: lint errors
1 parent 09fa8a5 commit a1c4b05

File tree

7 files changed

+32
-31
lines changed

7 files changed

+32
-31
lines changed

packages/amazonq/src/app/inline/EditRendering/displayImage.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ export async function displaySvgDecoration(
323323
if (Math.abs(startLine - currentCursorLine) >= autoDiscardEditCursorDistance) {
324324
// Emit DISCARD telemetry for edit suggestion that can't be shown because the suggestion is too far away
325325
const params = createDiscardTelemetryParams(session, item)
326-
languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
326+
void languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
327327
logSuggestionFailure('DISCARD', 'cursor is too far away', item.insertText as string)
328328
return
329329
}
@@ -342,7 +342,7 @@ export async function displaySvgDecoration(
342342

343343
// Emit DISCARD telemetry for edit suggestion that can't be shown due to active completion
344344
const params = createDiscardTelemetryParams(session, item)
345-
languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
345+
void languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
346346
logSuggestionFailure('DISCARD', 'Conflicting active inline completion', item.insertText as string)
347347
return
348348
}
@@ -355,7 +355,7 @@ export async function displaySvgDecoration(
355355

356356
const params = createDiscardTelemetryParams(session, item)
357357
// TODO: this session is closed on flare side hence discarded is not emitted in flare
358-
languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
358+
void languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
359359
logSuggestionFailure('DISCARD', 'Invalid patch', item.insertText as string)
360360
return
361361
}
@@ -433,7 +433,7 @@ export async function displaySvgDecoration(
433433
firstCompletionDisplayLatency: session.firstCompletionDisplayLatency,
434434
isInlineEdit: true,
435435
}
436-
languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
436+
void languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
437437
session.triggerOnAcceptance = true
438438
},
439439
async (isDiscard: boolean) => {
@@ -466,7 +466,7 @@ export async function displaySvgDecoration(
466466
firstCompletionDisplayLatency: session.firstCompletionDisplayLatency,
467467
isInlineEdit: true,
468468
}
469-
languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
469+
void languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
470470
},
471471
originalCode,
472472
newCode,

packages/amazonq/src/app/inline/completion.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export class InlineCompletionManager implements Disposable {
140140
addedDiagnostics: diagnosticDiff.added.map((it) => toIdeDiagnostics(it)),
141141
removedDiagnostics: diagnosticDiff.removed.map((it) => toIdeDiagnostics(it)),
142142
}
143-
this.languageClient.sendNotification(this.logSessionResultMessageName, params)
143+
void this.languageClient.sendNotification(this.logSessionResultMessageName, params)
144144
this.disposable.dispose()
145145
this.disposable = languages.registerInlineCompletionItemProvider(
146146
CodeWhispererConstants.platformLanguageIds,
@@ -200,7 +200,7 @@ export class InlineCompletionManager implements Disposable {
200200
firstCompletionDisplayLatency: session.firstCompletionDisplayLatency,
201201
totalSessionDisplayTime: totalSessionDisplayTime,
202202
}
203-
this.languageClient.sendNotification(this.logSessionResultMessageName, params)
203+
void this.languageClient.sendNotification(this.logSessionResultMessageName, params)
204204
// clear session manager states once rejected
205205
this.sessionManager.clear()
206206
} finally {
@@ -282,7 +282,7 @@ export class AmazonQInlineCompletionItemProvider implements InlineCompletionItem
282282
firstCompletionDisplayLatency: session.firstCompletionDisplayLatency,
283283
totalSessionDisplayTime: Date.now() - session.requestStartTime,
284284
}
285-
this.languageClient.sendNotification(this.logSessionResultMessageName, params)
285+
void this.languageClient.sendNotification(this.logSessionResultMessageName, params)
286286
}
287287
}
288288

@@ -427,7 +427,7 @@ export class AmazonQInlineCompletionItemProvider implements InlineCompletionItem
427427
firstCompletionDisplayLatency: prevSession.firstCompletionDisplayLatency,
428428
totalSessionDisplayTime: Date.now() - prevSession.requestStartTime,
429429
}
430-
this.languageClient.sendNotification(this.logSessionResultMessageName, params)
430+
void this.languageClient.sendNotification(this.logSessionResultMessageName, params)
431431
this.sessionManager.clear()
432432
// Do not make auto trigger if user rejects a suggestion
433433
// by typing characters that does not match
@@ -499,7 +499,7 @@ ${itemLog}
499499
},
500500
},
501501
}
502-
this.languageClient.sendNotification(this.logSessionResultMessageName, params)
502+
void this.languageClient.sendNotification(this.logSessionResultMessageName, params)
503503
this.sessionManager.clear()
504504
logstr += `- cursor moved behind trigger position. Discarding completion suggestion...`
505505
return []
@@ -566,7 +566,7 @@ ${itemLog}
566566
},
567567
},
568568
}
569-
this.languageClient.sendNotification(this.logSessionResultMessageName, params)
569+
void this.languageClient.sendNotification(this.logSessionResultMessageName, params)
570570
this.sessionManager.clear()
571571
logstr += `- suggestion does not match user typeahead from insertion position. Discarding suggestion...`
572572
return []

packages/amazonq/src/app/inline/recommendationService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export class RecommendationService {
215215
])
216216
),
217217
}
218-
languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
218+
void languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
219219
this.sessionManager.clear()
220220
this.logger.info(
221221
'Suggetions were discarded; reason: active edit suggestion displayed longer than 1 second'

packages/amazonq/src/lsp/chat/messages.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export function registerActiveEditorChangeListener(languageClient: BaseLanguageC
107107
}
108108
cursorState = getCursorState(editor.selections)
109109
}
110-
languageClient.sendNotification(activeEditorChangedNotificationType.method, {
110+
void languageClient.sendNotification(activeEditorChangedNotificationType.method, {
111111
textDocument,
112112
cursorState,
113113
})
@@ -187,7 +187,7 @@ export function registerMessageListeners(
187187
languageClient.info(
188188
`[VSCode Client] Chat options flags: mcpServers=${pendingChatOptions?.mcpServers}, history=${pendingChatOptions?.history}, export=${pendingChatOptions?.export}, quickActions=[${quickActionsDisplay}]`
189189
)
190-
languageClient.sendNotification(message.command, message.params)
190+
void languageClient.sendNotification(message.command, message.params)
191191
} catch (err) {
192192
languageClient.error(
193193
`[VSCode Client] Failed to send CHAT_OPTIONS after "aws/chat/ready" event: ${(err as Error).message}`
@@ -212,7 +212,7 @@ export function registerMessageListeners(
212212
textDocument = { uri: editor.document.uri.toString() }
213213
}
214214

215-
languageClient.sendNotification(insertToCursorPositionNotificationType.method, {
215+
void languageClient.sendNotification(insertToCursorPositionNotificationType.method, {
216216
...message.params,
217217
cursorPosition,
218218
textDocument,
@@ -472,7 +472,7 @@ export function registerMessageListeners(
472472
break
473473
case followUpClickNotificationType.method:
474474
if (!isValidAuthFollowUpType(message.params.followUp.type)) {
475-
languageClient.sendNotification(followUpClickNotificationType.method, message.params)
475+
void languageClient.sendNotification(followUpClickNotificationType.method, message.params)
476476
}
477477
break
478478
case buttonClickRequestType.method: {
@@ -494,7 +494,7 @@ export function registerMessageListeners(
494494
} else if (exitFocus(message.params)) {
495495
await setContext('aws.amazonq.amazonqChatLSP.isFocus', false)
496496
}
497-
languageClient.sendNotification(message.command, message.params)
497+
void languageClient.sendNotification(message.command, message.params)
498498
}
499499
break
500500
}
@@ -737,7 +737,7 @@ function exitFocus(params: any) {
737737
* Decodes partial chat responses from the language server before sending them to mynah UI
738738
*/
739739
async function handlePartialResult<T extends ChatResult>(
740-
partialResult: any,
740+
partialResult: string | T,
741741
encryptionKey: Buffer | undefined,
742742
provider: AmazonQChatViewProvider,
743743
tabId: string

packages/amazonq/src/lsp/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,15 @@ export async function pushConfigUpdate(client: BaseLanguageClient, config: QConf
8181
break
8282
case 'customization':
8383
logger.debug(`Pushing customization configuration: ${config.customization || 'undefined'}`)
84-
client.sendNotification(DidChangeConfigurationNotification.type.method, {
84+
void client.sendNotification(DidChangeConfigurationNotification.type.method, {
8585
section: 'aws.q',
8686
settings: { customization: config.customization },
8787
})
8888
logger.debug(`Customization configuration pushed successfully`)
8989
break
9090
case 'logLevel':
9191
logger.debug(`Pushing log level configuration`)
92-
client.sendNotification(DidChangeConfigurationNotification.type.method, {
92+
void client.sendNotification(DidChangeConfigurationNotification.type.method, {
9393
section: 'aws.logLevel',
9494
})
9595
logger.debug(`Log level configuration pushed successfully`)

packages/core/src/ssmDocument/ssm/ssmClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export async function activate(extensionContext: ExtensionContext) {
102102
)
103103
client.registerProposedFeatures()
104104

105-
client.start()
105+
void client.start()
106106
toDispose.push(client)
107107

108108
languages.setLanguageConfiguration('ssm-json', jsonLanguageConfiguration)

packages/core/src/stepFunctions/asl/aslServer.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {
3333
ServerCapabilities,
3434
TextDocuments,
3535
TextDocumentSyncKind,
36+
DidChangeWatchedFilesParams,
3637
} from 'vscode-languageserver'
3738

3839
import { posix } from 'path'
@@ -314,7 +315,7 @@ function validateTextDocument(textDocument: TextDocument, callback?: (diagnostic
314315
)
315316
}
316317

317-
connection.onDidChangeWatchedFiles((change: any) => {
318+
connection.onDidChangeWatchedFiles((change: DidChangeWatchedFilesParams) => {
318319
// Monitored files have changed in VSCode
319320
let hasChanges = false
320321
for (const c of change.changes) {
@@ -342,7 +343,7 @@ function getJSONDocument(document: TextDocument): JSONDocument {
342343
return jsonDocuments.get(document)
343344
}
344345

345-
connection.onCompletion((textDocumentPosition: any, token: any) => {
346+
connection.onCompletion((textDocumentPosition, token) => {
346347
return runSafeAsync(
347348
async () => {
348349
const document = documents.get(textDocumentPosition.textDocument.uri)
@@ -364,7 +365,7 @@ connection.onCompletion((textDocumentPosition: any, token: any) => {
364365
)
365366
})
366367

367-
connection.onCompletionResolve((completionItem: any, token: any) => {
368+
connection.onCompletionResolve((completionItem, token) => {
368369
return runSafeAsync(
369370
() => {
370371
// the asl-yaml-languageservice uses doResolve from the asl service
@@ -376,7 +377,7 @@ connection.onCompletionResolve((completionItem: any, token: any) => {
376377
)
377378
})
378379

379-
connection.onHover((textDocumentPositionParams: any, token: any) => {
380+
connection.onHover((textDocumentPositionParams, token) => {
380381
return runSafeAsync(
381382
async () => {
382383
const document = documents.get(textDocumentPositionParams.textDocument.uri)
@@ -397,7 +398,7 @@ connection.onHover((textDocumentPositionParams: any, token: any) => {
397398
)
398399
})
399400

400-
connection.onDocumentSymbol((documentSymbolParams: any, token: any) => {
401+
connection.onDocumentSymbol((documentSymbolParams, token) => {
401402
return runSafe(
402403
() => {
403404
const document = documents.get(documentSymbolParams.textDocument.uri)
@@ -429,7 +430,7 @@ connection.onDocumentSymbol((documentSymbolParams: any, token: any) => {
429430
)
430431
})
431432

432-
connection.onDocumentRangeFormatting((formatParams: any, token: any) => {
433+
connection.onDocumentRangeFormatting((formatParams, token) => {
433434
return runSafe(
434435
() => {
435436
const document = documents.get(formatParams.textDocument.uri)
@@ -449,7 +450,7 @@ connection.onDocumentRangeFormatting((formatParams: any, token: any) => {
449450
)
450451
})
451452

452-
connection.onDocumentColor((params: any, token: any) => {
453+
connection.onDocumentColor((params, token) => {
453454
return runSafeAsync(
454455
async () => {
455456
const document = documents.get(params.textDocument.uri)
@@ -475,7 +476,7 @@ connection.onDocumentColor((params: any, token: any) => {
475476
)
476477
})
477478

478-
connection.onColorPresentation((params: any, token: any) => {
479+
connection.onColorPresentation((params, token) => {
479480
return runSafe(
480481
() => {
481482
const document = documents.get(params.textDocument.uri)
@@ -498,7 +499,7 @@ connection.onColorPresentation((params: any, token: any) => {
498499
)
499500
})
500501

501-
connection.onFoldingRanges((params: any, token: any) => {
502+
connection.onFoldingRanges((params, token) => {
502503
return runSafe(
503504
() => {
504505
const document = documents.get(params.textDocument.uri)
@@ -522,7 +523,7 @@ connection.onFoldingRanges((params: any, token: any) => {
522523
)
523524
})
524525

525-
connection.onSelectionRanges((params: any, token: any) => {
526+
connection.onSelectionRanges((params, token) => {
526527
return runSafe(
527528
() => {
528529
const document = documents.get(params.textDocument.uri)

0 commit comments

Comments
 (0)