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 fuse (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Jan 24, 2024
1 parent 8e4781e commit 31a18f3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { createConnection, TextDocuments } from "vscode-languageserver/node";
import { ValidationManager } from "../src/services/validationManager";
import { ExtensionSettings } from "../src/interfaces/extensionSettings";

// eslint-disable-next-line @typescript-eslint/no-var-requires
const Fuse = require("fuse.js");
import Fuse from "fuse.js";

export const FIXTURES_BASE_PATH = path.join("test", "fixtures");
export const ANSIBLE_COLLECTIONS_FIXTURES_BASE_PATH = path.resolve(
Expand Down Expand Up @@ -106,7 +105,6 @@ export function smartFilter(completionList, triggerCharacter) {
const searcher = new Fuse(completionList, {
keys: ["filterText"],
threshold: 0.4,
refIndex: false,
});

let filteredCompletionList = triggerCharacter
Expand All @@ -119,7 +117,6 @@ export function smartFilter(completionList, triggerCharacter) {
const newSearcher = new Fuse(completionList, {
keys: ["label"],
threshold: 0.2,
refIndex: false,
});

filteredCompletionList = triggerCharacter
Expand Down

0 comments on commit 31a18f3

Please sign in to comment.