diff options
author | Rich Trott <rtrott@gmail.com> | 2021-04-24 18:47:29 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2021-04-26 19:19:08 +0300 |
commit | b2be410f533c4fdce60ed0d257ab7a6cd2f1da8a (patch) | |
tree | 15b2f5afd3c6006db604fbf9d7112af4df4f5dc9 /tools | |
parent | bbe24e2171bc2443ad274924465c3c1660c595d9 (diff) |
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: https://github.com/nodejs/node/pull/38384
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lint-md.js | 5 | ||||
-rw-r--r-- | tools/node-lint-md-cli-rollup/package-lock.json | 12 |
2 files changed, 11 insertions, 6 deletions
diff --git a/tools/lint-md.js b/tools/lint-md.js index 5c2f40abc7b..57aeb202322 100644 --- a/tools/lint-md.js +++ b/tools/lint-md.js @@ -49667,6 +49667,11 @@ function validateMeta(node, file, meta) { function validateYAMLComments(tree, file) { unistUtilVisit(tree, "html", function visitor(node) { + if (node.value.startsWith("<!--YAML\n")) + file.message( + "Expected `<!-- YAML`, found `<!--YAML`. Please add a space", + node + ); if (!node.value.startsWith("<!-- YAML\n")) return; try { const meta = jsYaml$2.load("#" + node.value.slice(0, -"-->".length)); diff --git a/tools/node-lint-md-cli-rollup/package-lock.json b/tools/node-lint-md-cli-rollup/package-lock.json index f2e9be4fc61..5fccba999a5 100644 --- a/tools/node-lint-md-cli-rollup/package-lock.json +++ b/tools/node-lint-md-cli-rollup/package-lock.json @@ -2111,9 +2111,9 @@ } }, "node_modules/remark-preset-lint-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/remark-preset-lint-node/-/remark-preset-lint-node-2.1.1.tgz", - "integrity": "sha512-3Cv4kDVaC8V0XsiK/ntdpOEztOx0v8L9DczQ3KRIN7QwyPS3Gjaq2DJ7wNglXVK4z7PekcND0mXK78eLduhwwA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/remark-preset-lint-node/-/remark-preset-lint-node-2.2.0.tgz", + "integrity": "sha512-85wnJs7HyQlY3Ae5HRxPjJx5cFBvAAOSfSpmyNVb6Fs9HYoR9ipimAxWfl2M1gYVT2rBrod8Jzu415dOMukzOw==", "dependencies": { "js-yaml": "^4.0.0", "remark-lint": "^8.0.0", @@ -4226,9 +4226,9 @@ } }, "remark-preset-lint-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/remark-preset-lint-node/-/remark-preset-lint-node-2.1.1.tgz", - "integrity": "sha512-3Cv4kDVaC8V0XsiK/ntdpOEztOx0v8L9DczQ3KRIN7QwyPS3Gjaq2DJ7wNglXVK4z7PekcND0mXK78eLduhwwA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/remark-preset-lint-node/-/remark-preset-lint-node-2.2.0.tgz", + "integrity": "sha512-85wnJs7HyQlY3Ae5HRxPjJx5cFBvAAOSfSpmyNVb6Fs9HYoR9ipimAxWfl2M1gYVT2rBrod8Jzu415dOMukzOw==", "requires": { "js-yaml": "^4.0.0", "remark-lint": "^8.0.0", |