Skip to content

Commit

Permalink
refactor: use const instead of let
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshinorin committed May 1, 2023
1 parent 448fb65 commit 16f3399
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/currentFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ export class CurrentFile {
);
}
private set startsFromWorkSpaceHighestDirectoryPath(path: string) {
let folders = workspace.workspaceFolders;
const folders = workspace.workspaceFolders;
if (folders === undefined) {
this._startsFromWorkSpaceHighestDirectoryPath = path;
return;
}
let rootFolderObj = folders.find(x => {
const rootFolderObj = folders.find(x => {
return this.toUnixStyle(path).startsWith(
this.toUnixStyle(x.uri.fsPath)
);
Expand Down Expand Up @@ -135,7 +135,7 @@ export class CurrentFile {
}

public update() {
let editor = window.activeTextEditor;
const editor = window.activeTextEditor;
if (!editor) {
this.statusBarItem.hide();
return;
Expand Down
2 changes: 1 addition & 1 deletion src/editorChangeListner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class EditorChangeListner {
constructor(currentFile: CurrentFile) {
this._currentFile = currentFile;

let subscriptions: Disposable[] = [];
const subscriptions: Disposable[] = [];
window.onDidChangeActiveTextEditor(this._onEvent, this, subscriptions);
this._disposable = Disposable.from(...subscriptions);
}
Expand Down
6 changes: 3 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { CurrentFile } from "./currentFile";
import { EditorChangeListner } from "./editorChangeListner";

export function activate(context: ExtensionContext) {
let currentFile = new CurrentFile();
let listner = new EditorChangeListner(currentFile);
const currentFile = new CurrentFile();
const listner = new EditorChangeListner(currentFile);

let disposableCommands = [
const disposableCommands = [
commands.registerCommand(
"currentFilePath.executeQuickPickerAction",
() => {
Expand Down
2 changes: 1 addition & 1 deletion src/quickPicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class QuickPicker {
});


let selectedAction = await window.showQuickPick(this._pickItems, {
const selectedAction = await window.showQuickPick(this._pickItems, {
placeHolder: "Select"
});

Expand Down
2 changes: 1 addition & 1 deletion src/test/runSpecificVersionTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async function main() {
const extensionTestsPath = path.resolve(__dirname, './suite/index');

// v1.45.0 test
let vscodeExecutablePath = await downloadAndUnzipVSCode('1.45.0');
const vscodeExecutablePath = await downloadAndUnzipVSCode('1.45.0');
try {
await runTests({
vscodeExecutablePath,
Expand Down

0 comments on commit 16f3399

Please sign in to comment.