From d25c856e3b89a9ad51c08c340777d21c1228e9ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Zugmeyer?= Date: Fri, 20 Sep 2024 22:38:24 +0200 Subject: [PATCH] tests: saner plugins config --- src/test/plugin.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/test/plugin.js b/src/test/plugin.js index 0cbb235..3d36067 100644 --- a/src/test/plugin.js +++ b/src/test/plugin.js @@ -25,12 +25,6 @@ async function execute(file, options = {}) { let eslintOptions if (matchVersion(">= 9")) { eslintOptions = { - plugins: - options.usePlugin === false - ? {} - : { - html: eslintPluginHtml, - }, baseConfig: { files: ["**/*.*"], settings: options.settings || {}, @@ -58,7 +52,7 @@ async function execute(file, options = {}) { } : {}), }, - plugins: options.plugins || {}, + plugins: options.plugins || { html: eslintPluginHtml }, }, ignore: false, ignorePatterns: [], @@ -159,7 +153,7 @@ ifVersion( "does not apply the plugin if it is not used in the configuration", async () => { const messages = await execute("simple.html", { - usePlugin: false, + plugins: {}, rules: { "no-console": "error", }, @@ -882,6 +876,7 @@ ifVersion(">= 5", describe, "compatibility with external HTML plugins", () => { ? { plugins: { "@html-eslint": require("@html-eslint/eslint-plugin"), + html: eslintPluginHtml, }, parser: require("@html-eslint/parser"), }