Skip to content

Commit

Permalink
[lint] Remove some unused variables
Browse files Browse the repository at this point in the history
This commit removes unused variables or add underscores to those in need.

ONE-vscode-DCO-1.0-Signed-off-by: Dayoung Lee <[email protected]>
  • Loading branch information
dayo09 committed Sep 15, 2022
1 parent c1c436d commit 8225d1f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/CfgEditor/CfgEditorPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export class CfgEditorPanel implements vscode.CustomTextEditorProvider {
}
});

webviewPanel.onDidChangeViewState(e => {
webviewPanel.onDidChangeViewState(() => {
if (webviewPanel.visible) {
vscode.commands.executeCommand('one.explorer.revealInOneExplorer', document.fileName);
}
Expand Down
3 changes: 1 addition & 2 deletions src/Execute/DeviceViewProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {globalBackendMap} from '../Backend/API';
import {Command} from '../Backend/Command';
import {Executor} from '../Backend/Executor';
import {DeviceSpec, supportedSpecs} from '../Backend/Spec';
import {Balloon} from '../Utils/Balloon';
import {Logger} from '../Utils/Logger';

import {Device} from './Device';
Expand Down Expand Up @@ -150,7 +149,7 @@ export class DeviceViewProvider implements vscode.TreeDataProvider<DeviceViewNod
}

private getDevicesPromise(cmd: Command, deviceSpec: DeviceSpec): Promise<Device[]> {
return new Promise<Device[]>((resolve, reject) => {
return new Promise<Device[]>((resolve) => {
let result: string = '';
let error: string = '';
let cmdSpawn = cp.spawn(cmd.str(), {shell: false});
Expand Down
1 change: 0 additions & 1 deletion src/Job/ToolRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {Logger} from '../Utils/Logger';
import {pipedSpawn} from '../Utils/PipedSpawn';
import {ToolArgs} from './ToolArgs';

const path = require('path');
const which = require('which');

const K_DATA: string = 'data';
Expand Down
2 changes: 1 addition & 1 deletion src/Jsontracer/JsonTracerViewerPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class JsonTracerViewerPanel implements vscode.CustomTextEditorProvider {
}
});

webviewPanel.onDidChangeViewState(e => {
webviewPanel.onDidChangeViewState(() => {
vscode.commands.executeCommand(
'setContext', JsonTracerViewerPanel.viewType, webviewPanel.visible);
}, null, this._disposables);
Expand Down
4 changes: 2 additions & 2 deletions src/View/InstallQuickInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {InputStep, MultiStepInput} from '../Utils/MultiStepInput';
async function shouldResume() {
// Could show a notification with the option to resume.
return new Promise<boolean>(
(resolve, reject) => {
() => {
// noop
});
}
Expand Down Expand Up @@ -268,7 +268,7 @@ class InstallQuickInput {
}

/* istanbul ignore next */
public async updateBackend(input: MultiStepInput, state: Partial<InstallQuickInputState>) {
public async updateBackend(input: MultiStepInput, _state: Partial<InstallQuickInputState>) {
if (this.toolchainEnv === undefined || this.toolchainType === undefined) {
this.error = 'toolchainenv is undefined.';
throw Error('toolchainenv is undefined.');
Expand Down

0 comments on commit 8225d1f

Please sign in to comment.