Skip to content

Commit 0981045

Browse files
authored
refactor: using stricter tsconfig settings (#582)
1 parent 15e9568 commit 0981045

34 files changed

+116
-125
lines changed

package-lock.json

Lines changed: 14 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/changelistItems.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function getChangelistPickOptions(
1313
const picks: QuickPickItem[] = [];
1414

1515
picks.push(new NewChangeListItem());
16-
repository.changelists.forEach((group, changelist) => {
16+
repository.changelists.forEach((group, _changelist) => {
1717
if (group.resourceStates.length) {
1818
picks.push(new ChangeListItem(group));
1919
}
@@ -119,7 +119,7 @@ export async function inputCommitChangelist(repository: Repository) {
119119
export function patchChangelistOptions(repository: Repository) {
120120
const picks: QuickPickItem[] = [];
121121

122-
repository.changelists.forEach((group, changelist) => {
122+
repository.changelists.forEach((group, _changelist) => {
123123
if (group.resourceStates.length) {
124124
picks.push(new ChangeListItem(group));
125125
}

src/commands/addToIgnoreExplorer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export class AddToIgnoreExplorer extends Command {
66
super("svn.addToIgnoreExplorer");
77
}
88

9-
public async execute(mainUri?: Uri, allUris?: Uri[]) {
9+
public async execute(_mainUri?: Uri, allUris?: Uri[]) {
1010
if (!allUris || allUris.length === 0) {
1111
return;
1212
}

src/commands/changeList.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { commands, SourceControlResourceState, Uri, window } from "vscode";
1+
import { commands, Uri, window } from "vscode";
22
import { inputSwitchChangelist } from "../changelistItems";
33
import { Model } from "../model";
44
import { Resource } from "../resource";
@@ -64,7 +64,7 @@ export class ChangeList extends Command {
6464
const paths = uris.map(uri => uri.fsPath);
6565
let canRemove = false;
6666

67-
repository.changelists.forEach((group, changelist) => {
67+
repository.changelists.forEach((group, _changelist) => {
6868
if (
6969
group.resourceStates.some(state => {
7070
return paths.some(path => {
@@ -77,6 +77,8 @@ export class ChangeList extends Command {
7777
canRemove = true;
7878
return false;
7979
}
80+
81+
return;
8082
});
8183

8284
const changelistName = await inputSwitchChangelist(repository, canRemove);

src/commands/cleanup.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Model } from "../model";
21
import { Repository } from "../repository";
32
import { Command } from "./command";
43

src/commands/command.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ export abstract class Command implements Disposable {
185185

186186
return repository.getResourceFromFile(uri);
187187
}
188+
189+
return;
188190
}
189191

190192
protected async _openResource(
@@ -286,6 +288,8 @@ export abstract class Command implements Disposable {
286288
ref: against
287289
});
288290
}
291+
292+
return;
289293
}
290294

291295
protected getRightResource(
@@ -312,6 +316,8 @@ export abstract class Command implements Disposable {
312316
ref: against
313317
});
314318
}
319+
320+
return;
315321
}
316322

317323
private getTitle(resource: Resource, against?: string): string {

src/commands/promptAuth.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { window } from "vscode";
22
import { IAuth } from "../common/types";
3-
import { Repository } from "../repository";
43
import { Command } from "./command";
54

65
export class PromptAuth extends Command {

src/commands/renameExplorer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ export class RenameExplorer extends Command {
99
super("svn.renameExplorer", { repository: true });
1010
}
1111

12-
public async execute(repository: Repository, mainUri?: Uri, allUris?: Uri[]) {
12+
public async execute(
13+
repository: Repository,
14+
mainUri?: Uri,
15+
_allUris?: Uri[]
16+
) {
1317
if (!mainUri) {
1418
return;
1519
}

src/decorations/svnDecorationProvider.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ export default class SvnDecorationProvider implements DecorationProvider {
3131
this.collectDecorationData(this.repository.unversioned, newDecorations);
3232
this.collectDecorationData(this.repository.conflicts, newDecorations);
3333

34-
this.repository.changelists.forEach((group, changelist) => {
34+
this.repository.changelists.forEach((group, _changelist) => {
3535
this.collectDecorationData(group, newDecorations);
3636
});
3737

3838
const uris: Uri[] = [];
39-
newDecorations.forEach((value, uriString) => {
39+
newDecorations.forEach((_value, uriString) => {
4040
if (this.decorations.has(uriString)) {
4141
this.decorations.delete(uriString);
4242
} else {
4343
uris.push(Uri.parse(uriString));
4444
}
4545
});
46-
this.decorations.forEach((value, uriString) => {
46+
this.decorations.forEach((_value, uriString) => {
4747
uris.push(Uri.parse(uriString));
4848
});
4949
this.decorations = newDecorations;

src/decorations/svnIgnoreDecorationProvider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export default class SvnIgnoreDecorationProvider implements DecorationProvider {
4747
color: new ThemeColor("gitDecoration.ignoredResourceForeground")
4848
} as DecorationData;
4949
}
50+
return;
5051
});
5152
}
5253

0 commit comments

Comments
 (0)