From 88dd379c9ebf75ae2a9560b80d93ad859bd0400d Mon Sep 17 00:00:00 2001 From: Jason Luong Date: Mon, 23 Oct 2023 16:48:21 +0100 Subject: [PATCH] fix: linting --- src/snyk/common/commands/commandController.ts | 4 ++-- src/snyk/common/services/learnService.ts | 2 +- src/snyk/extension.ts | 12 ++++++------ .../ossVulnerabilityCountService.test.ts | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/snyk/common/commands/commandController.ts b/src/snyk/common/commands/commandController.ts index a9bdbf829..63bb9e82a 100644 --- a/src/snyk/common/commands/commandController.ts +++ b/src/snyk/common/commands/commandController.ts @@ -16,7 +16,7 @@ import { SNYK_OPEN_BROWSER_COMMAND, SNYK_SET_TOKEN_COMMAND, SNYK_TRUST_WORKSPACE_FOLDERS_COMMAND, - VSCODE_GO_TO_SETTINGS_COMMAND + VSCODE_GO_TO_SETTINGS_COMMAND, } from '../constants/commands'; import { COMMAND_DEBOUNCE_INTERVAL, IDE_NAME, SNYK_NAME_EXTENSION, SNYK_PUBLISHER } from '../constants/general'; import { ErrorHandler } from '../error/errorHandler'; @@ -48,7 +48,7 @@ export class CommandController { private languageServer: ILanguageServer, private logger: ILog, private analytics: IAnalytics, - ) { } + ) {} openBrowser(url: string): unknown { return this.executeCommand(SNYK_OPEN_BROWSER_COMMAND, this.openerService.openBrowserUrl.bind(this), url); diff --git a/src/snyk/common/services/learnService.ts b/src/snyk/common/services/learnService.ts index 7255f1f6d..19f6ef2c4 100644 --- a/src/snyk/common/services/learnService.ts +++ b/src/snyk/common/services/learnService.ts @@ -9,7 +9,7 @@ export type Lesson = { }; export class LearnService { - constructor(private commandExecutor: IVSCodeCommands) { } + constructor(private commandExecutor: IVSCodeCommands) {} async getOssLesson(vulnerability: OssIssueCommandArg): Promise { const cwe = vulnerability.identifiers?.CWE; diff --git a/src/snyk/extension.ts b/src/snyk/extension.ts index 59146bcb8..b6c0a59eb 100644 --- a/src/snyk/extension.ts +++ b/src/snyk/extension.ts @@ -263,12 +263,12 @@ class SnykExtension extends SnykLib implements IExtension { this.registerCommands(vscodeContext); const codeSecurityIssueProvider = new CodeSecurityIssueTreeProvider( - this.viewManagerService, - this.contextService, - this.snykCode, - configuration, - vsCodeLanguages, - ), + this.viewManagerService, + this.contextService, + this.snykCode, + configuration, + vsCodeLanguages, + ), codeQualityIssueProvider = new CodeQualityIssueTreeProvider( this.viewManagerService, this.contextService, diff --git a/src/test/unit/snykOss/services/vulnerabilityCount/ossVulnerabilityCountService.test.ts b/src/test/unit/snykOss/services/vulnerabilityCount/ossVulnerabilityCountService.test.ts index 8251a89f9..3a6770a19 100644 --- a/src/test/unit/snykOss/services/vulnerabilityCount/ossVulnerabilityCountService.test.ts +++ b/src/test/unit/snykOss/services/vulnerabilityCount/ossVulnerabilityCountService.test.ts @@ -99,9 +99,9 @@ suite('OSS VulnerabilityCountService', () => { test('Processes file if active editor is opened on activation', () => { window.getActiveTextEditor = () => - ({ - document: undefined, - } as unknown as TextEditor); + ({ + document: undefined, + } as unknown as TextEditor); workspace.onDidChangeTextDocument = sinon.fake(); window.onDidChangeActiveTextEditor = sinon.fake();