diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc index 0b840121df2a04..5323c74a8171c1 100644 --- a/.markdownlint-cli2.jsonc +++ b/.markdownlint-cli2.jsonc @@ -1,6 +1,6 @@ { "config": { - "extends": "./.markdownlint.jsonc" + "extends": "./.markdownlint.jsonc", }, "customRules": ["markdownlint-rule-search-replace"], "ignores": [ @@ -8,6 +8,6 @@ ".git", ".github", "**/conflicting/**", - "**/orphaned/**" - ] + "**/orphaned/**", + ], } diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc index f73fa4b1db63a9..eda5c0055fd222 100644 --- a/.markdownlint.jsonc +++ b/.markdownlint.jsonc @@ -6,13 +6,13 @@ // Disabled, as some callouts include headings. "heading-increment": false, "ul-style": { - "style": "dash" + "style": "dash", }, "ul-indent": { - "indent": 2 + "indent": 2, }, "no-hard-tabs": { - "spaces_per_tab": 2 + "spaces_per_tab": 2, }, "line-length": false, "no-duplicate-heading": false, @@ -21,16 +21,16 @@ // "allow_different_nesting": true // }, "single-title": { - "front_matter_title": "^\\s*title\\s*[:=]" + "front_matter_title": "^\\s*title\\s*[:=]", }, "no-trailing-punctuation": { - "punctuation": ".,;:" + "punctuation": ".,;:", }, // Consecutive Notes/Callouts currently don't conform with this rule "no-blanks-blockquote": false, // Force ordered numbering to catch accidental list ending from indenting "ol-prefix": { - "style": "ordered" + "style": "ordered", }, "no-inline-html": { "allowed_elements": [ @@ -108,8 +108,8 @@ "i", // French translations use this for English literal text "h2", // XXX Not always converted currently because of live samples using English IDs "h3", // XXX Not always converted currently because of live samples using English IDs - "h6" // XXX Not always converted currently because of live samples using English IDs - ] + "h6", // XXX Not always converted currently because of live samples using English IDs + ], }, "no-bare-urls": false, // XXX Fixed upstream, remove next line when fixed here @@ -122,7 +122,7 @@ // XXX Fixed upstream, remove next line when fixed here "no-alt-text": false, "code-block-style": { - "style": "fenced" + "style": "fenced", }, "no-space-in-code": false, "emphasis-style": false, @@ -131,7 +131,7 @@ // "style": "underscore" // }, "strong-style": { - "style": "asterisk" + "style": "asterisk", }, // Disabled, as yari generates link fragments by replacing spaces with underscores, not dashes. "link-fragments": false, @@ -147,7 +147,7 @@ "message": "Don't use curly double quotes", "searchPattern": "/“|”/g", "replace": "\"", - "searchScope": "text" + "searchScope": "text", }, { // Does not apply to zh-cn @@ -155,14 +155,14 @@ "message": "Don't use curly single quotes", "searchPattern": "/‘|’/g", "replace": "'", - "searchScope": "text" + "searchScope": "text", }, { "name": "nbsp", "message": "Don't use no-break spaces", "searchPattern": "/ /g", "replace": " ", - "searchScope": "all" + "searchScope": "all", }, { // zh-cn/zh-tw prefers double em-dash instead @@ -170,56 +170,56 @@ "message": "Don't use '--'. Use em-dash (—) instead", "search": " -- ", "replace": " — ", - "searchScope": "text" + "searchScope": "text", }, { "name": "relative-link", "message": "Internal links should start with '/'", "searchPattern": "/([\\(\"])([\\w\\-]+)\\/docs/g", "replace": "$1/$2/docs", - "searchScope": "text" + "searchScope": "text", }, { "name": "relative-link-path", "message": "Don't use relative paths", "search": "](..", - "searchScope": "text" + "searchScope": "text", }, { "name": "trailing-spaces", "message": "Avoid trailing spaces", "searchPattern": "/ +$/gm", "replace": "", - "searchScope": "all" + "searchScope": "all", }, { "name": "double-spaces", "message": "Avoid double spaces", "searchPattern": "/([^\\s>]) ([^\\s|])/g", "replace": "$1 $2", - "searchScope": "text" + "searchScope": "text", }, { "name": "stuck-definition", "message": "Character is stuck to definition description marker", "searchPattern": "/- :(\\w)/g", "replace": "- : $1", - "searchScope": "text" + "searchScope": "text", }, { "name": "fqdn-moz-links", "message": "Don't use developer.mozilla.org for links, except for blog posts", "searchPattern": "/\\]\\(https:\\/\\/developer.mozilla.org\\/(?!en-US\\/blog\\/)/g", "replace": "](/", - "searchScope": "text" + "searchScope": "text", }, { "name": "localhost-links", "message": "Don't use localhost for links", "searchPattern": "/\\]\\(https?:\\/\\/localhost:\\d+\\//g", "replace": "](/", - "searchScope": "text" - } - ] - } + "searchScope": "text", + }, + ], + }, } diff --git a/docs/zh-cn/.markdownlint.jsonc b/docs/zh-cn/.markdownlint.jsonc index 535f256367dea4..e3c8def447f322 100644 --- a/docs/zh-cn/.markdownlint.jsonc +++ b/docs/zh-cn/.markdownlint.jsonc @@ -1,3 +1,3 @@ { - "extends": "../../files/zh-cn/.markdownlint.jsonc" + "extends": "../../files/zh-cn/.markdownlint.jsonc", } diff --git a/docs/zh-tw/.markdownlint.jsonc b/docs/zh-tw/.markdownlint.jsonc index 80b2f727b5f5ca..acea3e7209875d 100644 --- a/docs/zh-tw/.markdownlint.jsonc +++ b/docs/zh-tw/.markdownlint.jsonc @@ -1,3 +1,3 @@ { - "extends": "../../files/zh-tw/.markdownlint.jsonc" + "extends": "../../files/zh-tw/.markdownlint.jsonc", } diff --git a/files/ja/.markdownlint.jsonc b/files/ja/.markdownlint.jsonc index e9a890556f36aa..737a4b220f838d 100644 --- a/files/ja/.markdownlint.jsonc +++ b/files/ja/.markdownlint.jsonc @@ -1,6 +1,6 @@ { "extends": "../../.markdownlint.jsonc", "no-trailing-punctuation": { - "punctuation": ".,;:。、;:" - } + "punctuation": ".,;:。、;:", + }, } diff --git a/files/zh-cn/.markdownlint.jsonc b/files/zh-cn/.markdownlint.jsonc index 90b36b52b2b091..cb48f009c18eba 100644 --- a/files/zh-cn/.markdownlint.jsonc +++ b/files/zh-cn/.markdownlint.jsonc @@ -1,7 +1,7 @@ { "extends": "../../.markdownlint.jsonc", "no-trailing-punctuation": { - "punctuation": ".,;:。," + "punctuation": ".,;:。,", }, "search-replace": { "rules": [ @@ -10,69 +10,69 @@ "message": "Don't use no-break spaces", "searchPattern": "/ /g", "replace": " ", - "searchScope": "all" + "searchScope": "all", }, { "name": "double-em-dash", "message": "Don't use '--'. Use double em-dash (——) instead", "search": " -- ", "replace": "——", - "searchScope": "text" + "searchScope": "text", }, { "name": "relative-link", "message": "Internal links should start with '/'", "searchPattern": "/([\\(\"])([\\w\\-]+)\\/docs/g", "replace": "$1/$2/docs", - "searchScope": "text" + "searchScope": "text", }, { "name": "relative-link-path", "message": "Don't use relative paths", "search": "](..", - "searchScope": "text" + "searchScope": "text", }, { "name": "trailing-spaces", "message": "Avoid trailing spaces", "searchPattern": "/ +$/gm", "replace": "", - "searchScope": "all" + "searchScope": "all", }, { "name": "double-spaces", "message": "Avoid double spaces", "searchPattern": "/([^\\s>]) ([^\\s|])/g", "replace": "$1 $2", - "searchScope": "text" + "searchScope": "text", }, { "name": "stuck-definition", "message": "Character is stuck to definition description marker", "searchPattern": "/- :(\\w)/g", "replace": "- : $1", - "searchScope": "text" + "searchScope": "text", }, { "name": "fqdn-moz-links", "message": "Don't use developer.mozilla.org for links, except for blog posts", "searchPattern": "/\\]\\(https:\\/\\/developer.mozilla.org\\/(?!en-US\\/blog\\/)/g", "replace": "](/", - "searchScope": "text" + "searchScope": "text", }, { "name": "localhost-links", "message": "Don't use localhost for links", "searchPattern": "/\\]\\(https?:\\/\\/localhost:\\d+\\//g", "replace": "](/", - "searchScope": "text" + "searchScope": "text", }, { "name": "force-pronoun", "message": "Consider using '你' instead of '您'", "searchPattern": "/您/g", - "searchScope": "text" - } - ] - } + "searchScope": "text", + }, + ], + }, } diff --git a/files/zh-tw/.markdownlint.jsonc b/files/zh-tw/.markdownlint.jsonc index d765055e49f895..d736f1f2894c42 100644 --- a/files/zh-tw/.markdownlint.jsonc +++ b/files/zh-tw/.markdownlint.jsonc @@ -1,7 +1,7 @@ { "extends": "../../.markdownlint.jsonc", "no-trailing-punctuation": { - "punctuation": ".,;:。," + "punctuation": ".,;:。,", }, "search-replace": { "rules": [ @@ -10,97 +10,97 @@ "message": "Don't use curly double quotes", "searchPattern": "/“/g", "replace": "「", - "searchScope": "text" + "searchScope": "text", }, { "name": "curly-double-quotes-close", "message": "Don't use curly double quotes", "searchPattern": "/”/g", "replace": "」", - "searchScope": "text" + "searchScope": "text", }, { "name": "curly-single-quotes-open", "message": "Don't use curly single quotes", "searchPattern": "/‘/g", "replace": "『", - "searchScope": "text" + "searchScope": "text", }, { "name": "curly-single-quotes-close", "message": "Don't use curly single quotes", "searchPattern": "/’/g", "replace": "』", - "searchScope": "text" + "searchScope": "text", }, { "name": "nbsp", "message": "Don't use no-break spaces", "searchPattern": "/ /g", "replace": " ", - "searchScope": "all" + "searchScope": "all", }, { "name": "double-em-dash", "message": "Don't use '--'. Use double em-dash (——) instead", "search": " -- ", "replace": "——", - "searchScope": "text" + "searchScope": "text", }, { "name": "relative-link", "message": "Internal links should start with '/'", "searchPattern": "/([\\(\"])([\\w\\-]+)\\/docs/g", "replace": "$1/$2/docs", - "searchScope": "text" + "searchScope": "text", }, { "name": "relative-link-path", "message": "Don't use relative paths", "search": "](..", - "searchScope": "text" + "searchScope": "text", }, { "name": "trailing-spaces", "message": "Avoid trailing spaces", "searchPattern": "/ +$/gm", "replace": "", - "searchScope": "all" + "searchScope": "all", }, { "name": "double-spaces", "message": "Avoid double spaces", "searchPattern": "/([^\\s>]) ([^\\s|])/g", "replace": "$1 $2", - "searchScope": "text" + "searchScope": "text", }, { "name": "stuck-definition", "message": "Character is stuck to definition description marker", "searchPattern": "/- :(\\w)/g", "replace": "- : $1", - "searchScope": "text" + "searchScope": "text", }, { "name": "fqdn-moz-links", "message": "Don't use developer.mozilla.org for links, except for blog posts", "searchPattern": "/\\]\\(https:\\/\\/developer.mozilla.org\\/(?!en-US\\/blog\\/)/g", "replace": "](/", - "searchScope": "text" + "searchScope": "text", }, { "name": "localhost-links", "message": "Don't use localhost for links", "searchPattern": "/\\]\\(https?:\\/\\/localhost:\\d+\\//g", "replace": "](/", - "searchScope": "text" + "searchScope": "text", }, { "name": "force-pronoun", "message": "Consider using '你' instead of '您'", "searchPattern": "/您/g", - "searchScope": "text" - } - ] - } + "searchScope": "text", + }, + ], + }, } diff --git a/package.json b/package.json index b59ff862f26a20..1864189c6be3e7 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "markdownlint-rule-search-replace": "1.2.0", "mdast-util-from-markdown": "^2.0.0", "ora": "^8.0.1", - "prettier": "3.1.1", + "prettier": "3.2.2", "unist-util-visit": "^5.0.0", "yargs": "^17.7.2" } diff --git a/yarn.lock b/yarn.lock index 0cde79cf3868de..67670871fb1988 100644 --- a/yarn.lock +++ b/yarn.lock @@ -954,10 +954,10 @@ pidtree@0.6.0: resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== -prettier@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" - integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw== +prettier@3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.2.tgz#96e580f7ca9c96090ad054616c0c4597e2844b65" + integrity sha512-HTByuKZzw7utPiDO523Tt2pLtEyK7OibUD9suEJQrPUCYQqrHr74GGX6VidMrovbf/I50mPqr8j/II6oBAuc5A== punycode.js@^2.3.1: version "2.3.1"