From 772b7922b8ae71bdba24a50fb18c760f76d2b1ba Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 3 Jun 2024 16:20:54 +0200 Subject: [PATCH] use const (#477) --- generators/app/templates/ext-command-js/extension.js | 2 +- generators/app/templates/ext-command-ts/src/extension.ts | 2 +- generators/app/templates/ext-command-web/src/web/extension.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generators/app/templates/ext-command-js/extension.js b/generators/app/templates/ext-command-js/extension.js index 3b8a2ab0..1d538c79 100644 --- a/generators/app/templates/ext-command-js/extension.js +++ b/generators/app/templates/ext-command-js/extension.js @@ -17,7 +17,7 @@ function activate(context) { // The command has been defined in the package.json file // Now provide the implementation of the command with registerCommand // The commandId parameter must match the command field in package.json - let disposable = vscode.commands.registerCommand('<%= name %>.helloWorld', function () { + const disposable = vscode.commands.registerCommand('<%= name %>.helloWorld', function () { // The code you place here will be executed every time your command is executed // Display a message box to the user diff --git a/generators/app/templates/ext-command-ts/src/extension.ts b/generators/app/templates/ext-command-ts/src/extension.ts index e28a5dbc..89838273 100644 --- a/generators/app/templates/ext-command-ts/src/extension.ts +++ b/generators/app/templates/ext-command-ts/src/extension.ts @@ -13,7 +13,7 @@ export function activate(context: vscode.ExtensionContext) { // The command has been defined in the package.json file // Now provide the implementation of the command with registerCommand // The commandId parameter must match the command field in package.json - let disposable = vscode.commands.registerCommand('<%= name %>.helloWorld', () => { + const disposable = vscode.commands.registerCommand('<%= name %>.helloWorld', () => { // The code you place here will be executed every time your command is executed // Display a message box to the user vscode.window.showInformationMessage('Hello World from <%= displayName %>!'); diff --git a/generators/app/templates/ext-command-web/src/web/extension.ts b/generators/app/templates/ext-command-web/src/web/extension.ts index 2f9f6bd6..a008a0d7 100644 --- a/generators/app/templates/ext-command-web/src/web/extension.ts +++ b/generators/app/templates/ext-command-web/src/web/extension.ts @@ -13,7 +13,7 @@ export function activate(context: vscode.ExtensionContext) { // The command has been defined in the package.json file // Now provide the implementation of the command with registerCommand // The commandId parameter must match the command field in package.json - let disposable = vscode.commands.registerCommand('<%= name %>.helloWorld', () => { + const disposable = vscode.commands.registerCommand('<%= name %>.helloWorld', () => { // The code you place here will be executed every time your command is executed // Display a message box to the user