Skip to content

Commit dfdf6c7

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 95b9cc7 commit dfdf6c7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/lint-md.js

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

4971549715
function validateYAMLComments(tree, file) {
4971649716
unistUtilVisit(tree, "html", function visitor(node) {
49717+
if (node.value.startsWith("<!--YAML\n"))
49718+
file.message(
49719+
"Expected `<!-- YAML`, found `<!--YAML`. Please add a space",
49720+
node
49721+
);
4971749722
if (!node.value.startsWith("<!-- YAML\n")) return;
4971849723
try {
4971949724
const meta = jsYaml$2.load("#" + node.value.slice(0, -"-->".length));

0 commit comments

Comments
 (0)