Skip to content

Commit

Permalink
Fix introduced prism-eslint-hook complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Mar 11, 2024
1 parent 9aa8c63 commit 83de5e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/.eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const {
} = require("luxon");
const markdownIt = require("markdown-it");
const markdownItRuleExample = require("./tools/markdown-it-rule-example");
const { addContentMustBeMarked } = require("./tools/prism-eslint-hook");
const prismESLintHook = require("./tools/prism-eslint-hook");

module.exports = function(eleventyConfig) {

Expand Down Expand Up @@ -197,7 +197,7 @@ module.exports = function(eleventyConfig) {
const ruleExampleOptions = markdownItRuleExample({
open({ type, code, parserOptions, env, codeBlockToken }) {

addContentMustBeMarked(codeBlockToken.content, parserOptions);
prismESLintHook.addContentMustBeMarked(codeBlockToken.content, parserOptions);

const isRuleRemoved = !Object.hasOwn(env.rules_meta, env.title);

Expand Down
4 changes: 3 additions & 1 deletion docs/src/_plugins/md-syntax-highlighter.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ SOFTWARE.

const Prism = require("prismjs");
const loadLanguages = require("prismjs/components/");
require("../../tools/prism-eslint-hook").installPrismESLintMarkerHook();
const prismESLintHook = require("../../tools/prism-eslint-hook");

prismESLintHook.installPrismESLintMarkerHook();

/**
*
Expand Down

0 comments on commit 83de5e5

Please sign in to comment.