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

Commit 31a18f3

Browse files
authored
Address no-var-requires with fuse (#625)
1 parent 8e4781e commit 31a18f3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

test/helper.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { createConnection, TextDocuments } from "vscode-languageserver/node";
66
import { ValidationManager } from "../src/services/validationManager";
77
import { ExtensionSettings } from "../src/interfaces/extensionSettings";
88

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

1211
export const FIXTURES_BASE_PATH = path.join("test", "fixtures");
1312
export const ANSIBLE_COLLECTIONS_FIXTURES_BASE_PATH = path.resolve(
@@ -106,7 +105,6 @@ export function smartFilter(completionList, triggerCharacter) {
106105
const searcher = new Fuse(completionList, {
107106
keys: ["filterText"],
108107
threshold: 0.4,
109-
refIndex: false,
110108
});
111109

112110
let filteredCompletionList = triggerCharacter
@@ -119,7 +117,6 @@ export function smartFilter(completionList, triggerCharacter) {
119117
const newSearcher = new Fuse(completionList, {
120118
keys: ["label"],
121119
threshold: 0.2,
122-
refIndex: false,
123120
});
124121

125122
filteredCompletionList = triggerCharacter

0 commit comments

Comments
 (0)