Skip to content

Commit f1ea2c8

Browse files
Trotttargos
authored andcommitted
tools: update markdown linter rules
Update remark-preset-lint-node to 2.2.0 which includes improved YAML comment linting for our markdown files. PR-URL: #38384 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Shingo Inoue <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent f2c0258 commit f1ea2c8

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

tools/lint-md.js

+5
Original file line numberDiff line numberDiff line change
@@ -49667,6 +49667,11 @@ function validateMeta(node, file, meta) {
4966749667

4966849668
function validateYAMLComments(tree, file) {
4966949669
unistUtilVisit(tree, "html", function visitor(node) {
49670+
if (node.value.startsWith("<!--YAML\n"))
49671+
file.message(
49672+
"Expected `<!-- YAML`, found `<!--YAML`. Please add a space",
49673+
node
49674+
);
4967049675
if (!node.value.startsWith("<!-- YAML\n")) return;
4967149676
try {
4967249677
const meta = jsYaml$2.load("#" + node.value.slice(0, -"-->".length));

tools/node-lint-md-cli-rollup/package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)