Migrate all samples to eslint 9

Switches all samples to use eslint 9 with flat configs. I've tried to migrate existing settings as much as possible. However our eslint configs were also inconsistent so I've tried to align these too
This commit is contained in:
Matt Bierner
2024-10-26 17:44:03 -07:00
parent 7ce43a47d7
commit 73e249b3c1
403 changed files with 74894 additions and 51564 deletions

View File

@ -15,7 +15,7 @@ export const disposable = vscode.commands.registerTextEditorCommand('code-tutor.
const codeWithLineNumbers = getVisibleCodeWithLineNumbers(textEditor);
// select the 4o chat model
let [model] = await vscode.lm.selectChatModels({
const [model] = await vscode.lm.selectChatModels({
vendor: 'copilot',
family: 'gpt-4o',
});
@ -30,7 +30,7 @@ export const disposable = vscode.commands.registerTextEditorCommand('code-tutor.
if (model) {
// send the messages array to the model and get the response
let chatResponse = await model.sendRequest(messages, {}, new vscode.CancellationTokenSource().token);
const chatResponse = await model.sendRequest(messages, {}, new vscode.CancellationTokenSource().token);
// handle chat response
await parseChatResponse(chatResponse, textEditor);
@ -51,7 +51,7 @@ async function parseChatResponse(chatResponse: vscode.LanguageModelChatResponse,
// reset the accumulator for the next line
accumulatedResponse = "";
}
catch (e) {
catch {
// do nothing
}
}