mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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>
This commit is contained in:
1 parent
f2c0258b4c
commit
f1ea2c8e2b
2 files changed
+11
-6
No files matched your search
@@ -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));
|
||||
|
||||
+6
-6
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user