Skip to content

Commit

Permalink
Fix dirty-check pre-commit issue
Browse files Browse the repository at this point in the history
  • Loading branch information
audgirka committed Oct 10, 2024
1 parent 822bd27 commit 568615b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
12 changes: 2 additions & 10 deletions src/features/lightspeed/playbookGeneration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
import { isError, UNKNOWN_ERROR } from "./utils/errors";
import { getOneClickTrialProvider } from "./utils/oneClickTrial";
import { LightSpeedAPI } from "./api";
import * as syntaxHighlighter from "../utils/syntaxHighlighter";

let currentPanel: WebviewPanel | undefined;
let wizardId: string | undefined;
Expand Down Expand Up @@ -45,7 +46,7 @@ function contentMatch(generationId: string, playbook: string) {

async function sendActionEvent(
action: PlaybookGenerationActionType,
toPage?: number | undefined,
toPage?: number,
) {
if (currentPanel && wizardId) {
const fromPage = currentPage;
Expand Down Expand Up @@ -211,15 +212,6 @@ export async function showPlaybookGenerationPage(
}
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
let syntaxHighlighter: any;
try {
syntaxHighlighter =
await require(/* webpackIgnore: true */ "../../syntaxHighlighter/src/syntaxHighlighter");
} catch (error) {
syntaxHighlighter =
await require(/* webpackIgnore: true */ "../../../../syntaxHighlighter/src/syntaxHighlighter");
}
const html = await syntaxHighlighter.codeToHtml(
playbook,
darkMode ? "dark-plus" : "light-plus",
Expand Down
1 change: 1 addition & 0 deletions src/typing.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module "nyc";
3 changes: 1 addition & 2 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import * as path from "path";
import Mocha from "mocha";
import { glob } from "glob";
import { MochaOptions } from "vscode-extension-tester";
import NYC from "nyc";

function setupCoverage() {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const NYC = require("nyc");
const nyc = new NYC({
cwd: path.join(__dirname, "..", "..", ".."),
reporter: ["text", "html", "lcov"],
Expand Down

0 comments on commit 568615b

Please sign in to comment.