Skip to content

Commit 58717a3

Browse files
committed
Fix new ESLint issues
1 parent f6f0df7 commit 58717a3

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/features/PesterTests.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ export class PesterTestsFeature implements vscode.Disposable {
5353
launchType: LaunchType,
5454
fileUri?: vscode.Uri): Promise<boolean> {
5555

56-
if (fileUri === undefined) {
57-
fileUri = vscode.window.activeTextEditor?.document.uri;
58-
}
56+
fileUri ??= vscode.window.activeTextEditor?.document.uri;
5957

6058
if (fileUri === undefined) {
6159
return false;

src/logging.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ export class Logger implements ILogger {
140140
export class LanguageClientOutputChannelAdapter implements LogOutputChannel {
141141
private _channel: LogOutputChannel | undefined;
142142
private get channel(): LogOutputChannel {
143-
if (!this._channel) {
144-
this._channel = window.createOutputChannel(this.channelName, {log: true});
145-
}
143+
this._channel ??= window.createOutputChannel(this.channelName, {
144+
log: true,
145+
});
146146
return this._channel;
147147
}
148148

src/platform.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,9 +631,7 @@ class PossiblePowerShellExe implements IPossiblePowerShellExe {
631631
public readonly suppressWarning = false) { }
632632

633633
public async exists(): Promise<boolean> {
634-
if (this.knownToExist === undefined) {
635-
this.knownToExist = await utils.checkIfFileExists(this.exePath);
636-
}
634+
this.knownToExist ??= await utils.checkIfFileExists(this.exePath);
637635
return this.knownToExist ?? false;
638636
}
639637
}

0 commit comments

Comments
 (0)