Skip to content

Commit

Permalink
tests: saner plugins config
Browse files Browse the repository at this point in the history
  • Loading branch information
BenoitZugmeyer committed Sep 20, 2024
1 parent 37f5a42 commit d25c856
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/test/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || {},
Expand Down Expand Up @@ -58,7 +52,7 @@ async function execute(file, options = {}) {
}
: {}),
},
plugins: options.plugins || {},
plugins: options.plugins || { html: eslintPluginHtml },
},
ignore: false,
ignorePatterns: [],
Expand Down Expand Up @@ -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",
},
Expand Down Expand Up @@ -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"),
}
Expand Down

0 comments on commit d25c856

Please sign in to comment.