diff options
author | Rich Trott <rtrott@gmail.com> | 2021-04-24 18:47:29 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2021-04-29 14:45:35 +0300 |
commit | f1ea2c8e2b53c98fb484c06f75b5be8eef42e779 (patch) | |
tree | 92801f71b085029a5181e633ba88cd04f2ba9a52 /tools | |
parent | f2c0258b4c62be38ff1d43a2e26995b69cb9f225 (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", |