Skip to content

Commit 3e41544

Browse files
authored
refactor: Enable unused locals/parameters and implicit returns (#371)
1 parent 321cfd1 commit 3e41544

20 files changed

+29
-22
lines changed

src/controllers/libraryController.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ import * as fse from "fs-extra";
55
import * as _ from "lodash";
66
import * as minimatch from "minimatch";
77
import * as path from "path";
8-
import { commands, Disposable, ExtensionContext, Uri, window, workspace, WorkspaceFolder } from "vscode";
8+
import { Disposable, ExtensionContext, Uri, window, workspace, WorkspaceFolder } from "vscode";
99
import { instrumentOperationAsVsCodeCommand } from "vscode-extension-telemetry-wrapper";
1010
import { Commands } from "../commands";
1111
import { Jdtls } from "../java/jdtls";
1212
import { Settings } from "../settings";
1313
import { Utility } from "../utility";
14-
import { ContainerNode } from "../views/containerNode";
1514
import { DataNode } from "../views/dataNode";
1615

1716
export class LibraryController implements Disposable {

src/explorerCommands/delete.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { Uri, window, workspace } from "vscode";
55
import { DataNode } from "../views/dataNode";
66
import { ExplorerNode } from "../views/explorerNode";
7-
import { isMutable } from "./utils";
7+
import { isMutable } from "./utility";
88

99
const confirmMessage = "Move to Recycle Bin";
1010

src/explorerCommands/new.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as path from "path";
66
import { QuickPickItem, Uri, window, workspace, WorkspaceEdit } from "vscode";
77
import { NodeKind } from "../java/nodeData";
88
import { DataNode } from "../views/dataNode";
9-
import { checkJavaQualifiedName } from "./utils";
9+
import { checkJavaQualifiedName } from "./utility";
1010

1111
export async function newJavaClass(node: DataNode): Promise<void> {
1212
const packageFsPath: string = await getPackageFsPath(node);

src/explorerCommands/rename.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Uri, window, workspace, WorkspaceEdit } from "vscode";
77
import { NodeKind } from "../java/nodeData";
88
import { DataNode } from "../views/dataNode";
99
import { ExplorerNode } from "../views/explorerNode";
10-
import { checkJavaQualifiedName, isMutable } from "./utils";
10+
import { checkJavaQualifiedName, isMutable } from "./utility";
1111

1212
export async function renameFile(node: DataNode, selectedNode: ExplorerNode): Promise<void> {
1313
// if command not invoked by context menu, use selected node in explorer
File renamed without changes.

src/exportJarSteps/GenerateJarExecutor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class GenerateJarExecutor implements IExportJarStepExecutor {
6262
location: ProgressLocation.Window,
6363
title: "Exporting Jar : Generating jar...",
6464
cancellable: true,
65-
}, (progress, token) => {
65+
}, (_progress, token) => {
6666
return new Promise<boolean>(async (resolve, reject) => {
6767
token.onCancellationRequested(() => {
6868
return reject();
@@ -84,7 +84,7 @@ export class GenerateJarExecutor implements IExportJarStepExecutor {
8484
location: ProgressLocation.Window,
8585
title: "Exporting Jar : Resolving classpaths...",
8686
cancellable: true,
87-
}, (progress, token) => {
87+
}, (_progress, token) => {
8888
return new Promise<IJarQuickPickItem[]>(async (resolve, reject) => {
8989
token.onCancellationRequested(() => {
9090
return reject();

src/exportJarSteps/ResolveMainClassExecutor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class ResolveMainClassExecutor implements IExportJarStepExecutor {
3535
location: ProgressLocation.Window,
3636
title: "Exporting Jar : Resolving main classes...",
3737
cancellable: true,
38-
}, (progress, token) => {
38+
}, (_progress, token) => {
3939
return new Promise<IMainClassInfo[] | undefined>(async (resolve, reject) => {
4040
token.onCancellationRequested(() => {
4141
return reject();

src/views/containerNode.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ function getContainerType(containerPath: string | undefined): string {
5959
} else if (containerPath.startsWith(ContainerPath.ReferencedLibrary)) {
6060
return "referencedLibrary";
6161
}
62+
return "";
6263
}
6364

6465
const enum ContainerPath {

src/views/dataNode.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export abstract class DataNode extends ExplorerNode {
2727
item.contextValue = this.computeContextValue();
2828
return item;
2929
}
30+
return undefined;
3031
}
3132

3233
public get nodeData(): INodeData {

src/views/dependencyDataProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import * as _ from "lodash";
55
import {
66
commands, Event, EventEmitter, ExtensionContext, extensions, ProviderResult,
7-
Range, TreeDataProvider, TreeItem, Uri, window, workspace,
7+
TreeDataProvider, TreeItem, Uri, window, workspace,
88
} from "vscode";
99
import { instrumentOperation, instrumentOperationAsVsCodeCommand } from "vscode-extension-telemetry-wrapper";
1010
import { Commands } from "../commands";

0 commit comments

Comments
 (0)