From e08f9cdadc9acf86db9bb466a7c4f386eb0ebd03 Mon Sep 17 00:00:00 2001 From: David Anson Date: Tue, 29 Oct 2024 04:22:23 +0000 Subject: [PATCH] Update code for new markdownlint library version. --- markdownlint.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/markdownlint.js b/markdownlint.js index 6f9ec848e..a66da2c17 100755 --- a/markdownlint.js +++ b/markdownlint.js @@ -309,14 +309,13 @@ function lintAndPrint(stdin, files) { ...lintOptions, resultVersion: 3 }; - const markdownlintRuleHelpers = require('markdownlint/helpers'); for (const file of files) { fixOptions.files = [file]; const fixResult = markdownlint.sync(fixOptions); const fixes = fixResult[file].filter(error => error.fixInfo); if (fixes.length > 0) { const originalText = fs.readFileSync(file, fsOptions); - const fixedText = markdownlintRuleHelpers.applyFixes(originalText, fixes); + const fixedText = markdownlint.applyFixes(originalText, fixes); if (originalText !== fixedText) { fs.writeFileSync(file, fixedText, fsOptions); }