Skip to content

Commit

Permalink
chore: enable markdown-lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
yin1999 committed Aug 29, 2024
1 parent 849b609 commit f15c308
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions files/zh-cn/.markdownlint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"no-trailing-punctuation": {
"punctuation": ".,;:。,",
},
"fenced-code-language": true,
"search-replace": {
"rules": [
{
Expand Down Expand Up @@ -73,6 +74,26 @@
"searchPattern": "/您/g",
"searchScope": "text",
},
{
"name": "text-code-fence",
"message": "Use 'plain' tag",
"searchPattern": "/(^ *`{3,})(text|none|unix)/gm",
"replace": "$1plain",
"searchScope": "text",
},
{
"name": "gfm-alert",
"message": "Use the GFM syntax: https://developer.mozilla.org/zh-CN/docs/MDN/Writing_guidelines/Howto/Markdown_in_MDN#备注、警告和标注",
"searchPattern": "/^ *> \\*\\*(Note|Warning|Callout):\\*\\*(?! [[{`_*])/gm",
"searchScope": "text",
},
{
"name": "bad-gfm-alert",
"message": "Use the correct GFM syntax: `> [!NOTE]`",
// TODO this should use the modifier syntax; until it has better Node support
"searchPattern": "/^ *> !?\\[!?((?!NOTE)[Nn][Oo][Tt][Ee]|(?!WARNING)[Ww][Aa][Rr][Nn][Ii][Nn][Gg]|(?!CALLOUT)[Cc][Aa][Ll][Ll][Oo][Uu][Tt])\\]\\n|^ *> (?!\\[!)!?\\[!?(NOTE|WARNING|CALLOUT)\\]\\n/gm",
"searchScope": "text",
},
],
},
}

0 comments on commit f15c308

Please sign in to comment.