Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
Address no-var-requires with loading of package.json (#626)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Jan 25, 2024
1 parent 31a18f3 commit 13dba70
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/utils/runCommand.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import { WorkspaceManager } from "../../src/services/workspaceManager";
import { createConnection } from "vscode-languageserver/node";
import { getDoc } from "../helper";
import * as path from "path";
import { readFileSync } from "fs";

describe("commandRunner", () => {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const pkgJSON = require(path.resolve(__dirname, "..", "..", "package.json"));
const packageJsonPath = require.resolve("../../package.json");
const packageJsonContents = readFileSync(packageJsonPath).toString();
const pkgJSON = JSON.parse(packageJsonContents);

const tests = [
{
Expand Down

0 comments on commit 13dba70

Please sign in to comment.