From 2e63bf7dd81bdde4c36f6dcc91f7aec91eb4450e Mon Sep 17 00:00:00 2001 From: David Anson Date: Sun, 13 Nov 2022 20:53:10 -0800 Subject: [PATCH] Configure all rules that allow style=consistent (or similar) to require an explicit style for consistency across the project. --- .markdownlint.json | 32 +++++++++++ doc-build/build-rules.mjs | 2 +- doc-build/md053.md | 4 +- doc/CustomRules.md | 2 +- doc/Rules.md | 110 +++++++++++++++++++------------------- doc/md002.md | 2 +- doc/md003.md | 2 +- doc/md004.md | 2 +- doc/md007.md | 6 +-- doc/md009.md | 6 +-- doc/md010.md | 6 +-- doc/md012.md | 2 +- doc/md013.md | 18 +++---- doc/md022.md | 4 +- doc/md024.md | 4 +- doc/md025.md | 4 +- doc/md026.md | 2 +- doc/md029.md | 2 +- doc/md030.md | 8 +-- doc/md031.md | 2 +- doc/md033.md | 2 +- doc/md035.md | 2 +- doc/md036.md | 2 +- doc/md040.md | 4 +- doc/md041.md | 4 +- doc/md043.md | 6 +-- doc/md044.md | 6 +-- doc/md046.md | 2 +- doc/md048.md | 2 +- doc/md049.md | 2 +- doc/md050.md | 2 +- doc/md053.md | 6 +-- helpers/README.md | 6 +-- 33 files changed, 149 insertions(+), 117 deletions(-) diff --git a/.markdownlint.json b/.markdownlint.json index 87ad91b2..ae5e442e 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,10 +1,36 @@ { + "code-block-style": { + "style": "fenced" + }, + "code-fence-style": { + "style": "backtick" + }, + "emphasis-style": { + "style": "asterisk" + }, + "fenced-code-language": { + "allowed_languages": [ + "javascript", + "json", + "markdown" + ], + "language_only": true + }, + "heading-style": { + "style": "atx" + }, + "hr-style": { + "style": "---" + }, "line-length": { "strict": true }, "no-duplicate-heading": { "siblings_only": true }, + "ol-prefix": { + "style": "ordered" + }, "proper-names": { "code_blocks": false, "names": [ @@ -16,5 +42,11 @@ "markdownlint", "Node.js" ] + }, + "strong-style": { + "style": "asterisk" + }, + "ul-style": { + "style": "dash" } } diff --git a/doc-build/build-rules.mjs b/doc-build/build-rules.mjs index 8c28ea01..7f53961d 100644 --- a/doc-build/build-rules.mjs +++ b/doc-build/build-rules.mjs @@ -75,7 +75,7 @@ for (const rule of rules) { JSON.stringify(propData.default) : propData.default; const allValues = propData.enum?.sort(); - const listItem = `* \`${property}\`: ${propData.description} (` + + const listItem = `- \`${property}\`: ${propData.description} (` + `\`${propType}\`, default \`${defaultValue}\`` + (propData.enum ? `, values ${allValues.map((value) => `\`${value}\``).join(" / ")}` : diff --git a/doc-build/md053.md b/doc-build/md053.md index bc11bcae..933f9811 100644 --- a/doc-build/md053.md +++ b/doc-build/md053.md @@ -9,7 +9,7 @@ unnecessary: 1. If a label is not referenced by any link or image in a document, that definition is unused and can be deleted. -1. If a label is defined multiple times in a document, the first definition is +2. If a label is defined multiple times in a document, the first definition is used and the others can be deleted. This rule considers a reference definition to be used if any link or image @@ -21,6 +21,6 @@ be ignored by setting the `ignored_definitions` parameter. The default value of this parameter ignores the following convention for adding non-HTML comments to Markdown: -```md +```markdown [//]: # (This behaves like a comment) ``` diff --git a/doc/CustomRules.md b/doc/CustomRules.md index 53ea170b..4c40688c 100644 --- a/doc/CustomRules.md +++ b/doc/CustomRules.md @@ -16,7 +16,7 @@ the parsed input and a function to log any violations. A simple rule implementation looks like: -```js +```javascript module.exports = { "names": [ "any-blockquote" ], "description": "Rule that reports an error for any blockquote", diff --git a/doc/Rules.md b/doc/Rules.md index c4891a99..43bfcf70 100644 --- a/doc/Rules.md +++ b/doc/Rules.md @@ -57,7 +57,7 @@ Aliases: `first-header-h1`, `first-heading-h1` Parameters: -* `level`: Heading level (`integer`, default `1`) +- `level`: Heading level (`integer`, default `1`) > Note: *MD002 has been deprecated and is disabled by default.* > [MD041/first-line-heading](md041.md) offers an improved implementation. @@ -95,7 +95,7 @@ Aliases: `header-style`, `heading-style` Parameters: -* `style`: Heading style (`string`, default `consistent`, values `atx` / +- `style`: Heading style (`string`, default `consistent`, values `atx` / `atx_closed` / `consistent` / `setext` / `setext_with_atx` / `setext_with_atx_closed`) @@ -148,7 +148,7 @@ Aliases: `ul-style` Parameters: -* `style`: List style (`string`, default `consistent`, values `asterisk` / +- `style`: List style (`string`, default `consistent`, values `asterisk` / `consistent` / `dash` / `plus` / `sublist`) Fixable: Most violations can be fixed by tooling @@ -305,10 +305,10 @@ Aliases: `ul-indent` Parameters: -* `indent`: Spaces for indent (`integer`, default `2`) -* `start_indent`: Spaces for first level indent (when start_indented is set) +- `indent`: Spaces for indent (`integer`, default `2`) +- `start_indent`: Spaces for first level indent (when start_indented is set) (`integer`, default `2`) -* `start_indented`: Whether to indent the first level of the list (`boolean`, +- `start_indented`: Whether to indent the first level of the list (`boolean`, default `false`) Fixable: Most violations can be fixed by tooling @@ -363,10 +363,10 @@ Aliases: `no-trailing-spaces` Parameters: -* `br_spaces`: Spaces for line break (`integer`, default `2`) -* `list_item_empty_lines`: Allow spaces for empty lines in list items +- `br_spaces`: Spaces for line break (`integer`, default `2`) +- `list_item_empty_lines`: Allow spaces for empty lines in list items (`boolean`, default `false`) -* `strict`: Include unnecessary breaks (`boolean`, default `false`) +- `strict`: Include unnecessary breaks (`boolean`, default `false`) Fixable: Most violations can be fixed by tooling @@ -417,10 +417,10 @@ Aliases: `no-hard-tabs` Parameters: -* `code_blocks`: Include code blocks (`boolean`, default `true`) -* `ignore_code_languages`: Fenced code languages to ignore (`string[]`, default +- `code_blocks`: Include code blocks (`boolean`, default `true`) +- `ignore_code_languages`: Fenced code languages to ignore (`string[]`, default `[]`) -* `spaces_per_tab`: Number of spaces for each hard tab (`integer`, default `1`) +- `spaces_per_tab`: Number of spaces for each hard tab (`integer`, default `1`) Fixable: Most violations can be fixed by tooling @@ -509,7 +509,7 @@ Aliases: `no-multiple-blanks` Parameters: -* `maximum`: Consecutive blank lines (`integer`, default `1`) +- `maximum`: Consecutive blank lines (`integer`, default `1`) Fixable: Most violations can be fixed by tooling @@ -550,17 +550,17 @@ Aliases: `line-length` Parameters: -* `code_block_line_length`: Number of characters for code blocks (`integer`, +- `code_block_line_length`: Number of characters for code blocks (`integer`, default `80`) -* `code_blocks`: Include code blocks (`boolean`, default `true`) -* `headers`: Include headings (`boolean`, default `true`) -* `heading_line_length`: Number of characters for headings (`integer`, default +- `code_blocks`: Include code blocks (`boolean`, default `true`) +- `headers`: Include headings (`boolean`, default `true`) +- `heading_line_length`: Number of characters for headings (`integer`, default `80`) -* `headings`: Include headings (`boolean`, default `true`) -* `line_length`: Number of characters (`integer`, default `80`) -* `stern`: Stern length checking (`boolean`, default `false`) -* `strict`: Strict length checking (`boolean`, default `false`) -* `tables`: Include tables (`boolean`, default `true`) +- `headings`: Include headings (`boolean`, default `true`) +- `line_length`: Number of characters (`integer`, default `80`) +- `stern`: Stern length checking (`boolean`, default `false`) +- `strict`: Strict length checking (`boolean`, default `false`) +- `tables`: Include tables (`boolean`, default `true`) > If `headings` is not provided, `headers` (deprecated) will be used. @@ -797,8 +797,8 @@ Aliases: `blanks-around-headers`, `blanks-around-headings` Parameters: -* `lines_above`: Blank lines above heading (`integer`, default `1`) -* `lines_below`: Blank lines below heading (`integer`, default `1`) +- `lines_above`: Blank lines above heading (`integer`, default `1`) +- `lines_below`: Blank lines below heading (`integer`, default `1`) Fixable: Most violations can be fixed by tooling @@ -875,9 +875,9 @@ Aliases: `no-duplicate-header`, `no-duplicate-heading` Parameters: -* `allow_different_nesting`: Only check sibling headings (`boolean`, default +- `allow_different_nesting`: Only check sibling headings (`boolean`, default `false`) -* `siblings_only`: Only check sibling headings (`boolean`, default `false`) +- `siblings_only`: Only check sibling headings (`boolean`, default `false`) This rule is triggered if there are multiple headings in the document that have the same text: @@ -925,9 +925,9 @@ Aliases: `single-h1`, `single-title` Parameters: -* `front_matter_title`: RegExp for matching title in front matter (`string`, +- `front_matter_title`: RegExp for matching title in front matter (`string`, default `^\s*title\s*[:=]`) -* `level`: Heading level (`integer`, default `1`) +- `level`: Heading level (`integer`, default `1`) This rule is triggered when a top-level heading is in use (the first line of the file is an h1 heading), and more than one h1 heading is in use in the @@ -977,7 +977,7 @@ Aliases: `no-trailing-punctuation` Parameters: -* `punctuation`: Punctuation characters not allowed at end of headings +- `punctuation`: Punctuation characters not allowed at end of headings (`string`, default `.,;:!。,;:!`) Fixable: Most violations can be fixed by tooling @@ -1091,7 +1091,7 @@ Aliases: `ol-prefix` Parameters: -* `style`: List style (`string`, default `one_or_ordered`, values `one` / +- `style`: List style (`string`, default `one_or_ordered`, values `one` / `one_or_ordered` / `ordered` / `zero`) This rule is triggered for ordered lists that do not either start with '1.' or @@ -1192,12 +1192,12 @@ Aliases: `list-marker-space` Parameters: -* `ol_multi`: Spaces for multi-line ordered list items (`integer`, default `1`) -* `ol_single`: Spaces for single-line ordered list items (`integer`, default +- `ol_multi`: Spaces for multi-line ordered list items (`integer`, default `1`) +- `ol_single`: Spaces for single-line ordered list items (`integer`, default `1`) -* `ul_multi`: Spaces for multi-line unordered list items (`integer`, default +- `ul_multi`: Spaces for multi-line unordered list items (`integer`, default `1`) -* `ul_single`: Spaces for single-line unordered list items (`integer`, default +- `ul_single`: Spaces for single-line unordered list items (`integer`, default `1`) Fixable: Most violations can be fixed by tooling @@ -1277,7 +1277,7 @@ Aliases: `blanks-around-fences` Parameters: -* `list_items`: Include list items (`boolean`, default `true`) +- `list_items`: Include list items (`boolean`, default `true`) Fixable: Most violations can be fixed by tooling @@ -1371,7 +1371,7 @@ Aliases: `no-inline-html` Parameters: -* `allowed_elements`: Allowed elements (`string[]`, default `[]`) +- `allowed_elements`: Allowed elements (`string[]`, default `[]`) This rule is triggered whenever raw HTML is used in a Markdown document: @@ -1448,7 +1448,7 @@ Aliases: `hr-style` Parameters: -* `style`: Horizontal rule style (`string`, default `consistent`) +- `style`: Horizontal rule style (`string`, default `consistent`) This rule is triggered when inconsistent styles of horizontal rules are used in the document: @@ -1493,7 +1493,7 @@ Aliases: `no-emphasis-as-header`, `no-emphasis-as-heading` Parameters: -* `punctuation`: Punctuation characters (`string`, default `.,;:!?。,;:!?`) +- `punctuation`: Punctuation characters (`string`, default `.,;:!?。,;:!?`) This check looks for instances where emphasized (i.e. bold or italic) text is used to separate sections, where a heading should be used instead: @@ -1646,8 +1646,8 @@ Aliases: `fenced-code-language` Parameters: -* `allowed_languages`: List of languages (`string[]`, default `[]`) -* `language_only`: Require language only (`boolean`, default `false`) +- `allowed_languages`: List of languages (`string[]`, default `[]`) +- `language_only`: Require language only (`boolean`, default `false`) This rule is triggered when fenced code blocks are used, but a language isn't specified: @@ -1701,9 +1701,9 @@ Aliases: `first-line-h1`, `first-line-heading` Parameters: -* `front_matter_title`: RegExp for matching title in front matter (`string`, +- `front_matter_title`: RegExp for matching title in front matter (`string`, default `^\s*title\s*[:=]`) -* `level`: Heading level (`integer`, default `1`) +- `level`: Heading level (`integer`, default `1`) This rule is intended to ensure documents have a title and is triggered when the first line in the file isn't a top-level (h1) heading: @@ -1788,9 +1788,9 @@ Aliases: `required-headers`, `required-headings` Parameters: -* `headers`: List of headings (`string[]`, default `[]`) -* `headings`: List of headings (`string[]`, default `[]`) -* `match_case`: Match case of headings (`boolean`, default `false`) +- `headers`: List of headings (`string[]`, default `[]`) +- `headings`: List of headings (`string[]`, default `[]`) +- `match_case`: Match case of headings (`boolean`, default `false`) > If `headings` is not provided, `headers` (deprecated) will be used. @@ -1863,9 +1863,9 @@ Aliases: `proper-names` Parameters: -* `code_blocks`: Include code blocks (`boolean`, default `true`) -* `html_elements`: Include HTML elements (`boolean`, default `true`) -* `names`: List of proper names (`string[]`, default `[]`) +- `code_blocks`: Include code blocks (`boolean`, default `true`) +- `html_elements`: Include HTML elements (`boolean`, default `true`) +- `names`: List of proper names (`string[]`, default `[]`) Fixable: Most violations can be fixed by tooling @@ -1938,7 +1938,7 @@ Aliases: `code-block-style` Parameters: -* `style`: Block style (`string`, default `consistent`, values `consistent` / +- `style`: Block style (`string`, default `consistent`, values `consistent` / `fenced` / `indented`) This rule is triggered when unwanted or different code block styles are used in @@ -2018,7 +2018,7 @@ Aliases: `code-fence-style` Parameters: -* `style`: Code fence style (`string`, default `consistent`, values `backtick` +- `style`: Code fence style (`string`, default `consistent`, values `backtick` / `consistent` / `tilde`) This rule is triggered when the symbols used in the document for fenced code @@ -2062,7 +2062,7 @@ Aliases: `emphasis-style` Parameters: -* `style`: Emphasis style should be consistent (`string`, default `consistent`, +- `style`: Emphasis style should be consistent (`string`, default `consistent`, values `asterisk` / `consistent` / `underscore`) Fixable: Most violations can be fixed by tooling @@ -2097,7 +2097,7 @@ Aliases: `strong-style` Parameters: -* `style`: Strong style should be consistent (`string`, default `consistent`, +- `style`: Strong style should be consistent (`string`, default `consistent`, values `asterisk` / `consistent` / `underscore`) Fixable: Most violations can be fixed by tooling @@ -2219,7 +2219,7 @@ Aliases: `link-image-reference-definitions` Parameters: -* `ignored_definitions`: Ignored definitions (`string[]`, default `["//"]`) +- `ignored_definitions`: Ignored definitions (`string[]`, default `["//"]`) Fixable: Most violations can be fixed by tooling @@ -2234,7 +2234,7 @@ unnecessary: 1. If a label is not referenced by any link or image in a document, that definition is unused and can be deleted. -1. If a label is defined multiple times in a document, the first definition is +2. If a label is defined multiple times in a document, the first definition is used and the others can be deleted. This rule considers a reference definition to be used if any link or image @@ -2246,7 +2246,7 @@ be ignored by setting the `ignored_definitions` parameter. The default value of this parameter ignores the following convention for adding non-HTML comments to Markdown: -```md +```markdown [//]: # (This behaves like a comment) ``` diff --git a/doc/md002.md b/doc/md002.md index 203a85d8..2de5e6b5 100644 --- a/doc/md002.md +++ b/doc/md002.md @@ -8,7 +8,7 @@ Aliases: `first-header-h1`, `first-heading-h1` Parameters: -* `level`: Heading level (`integer`, default `1`) +- `level`: Heading level (`integer`, default `1`) > Note: *MD002 has been deprecated and is disabled by default.* > [MD041/first-line-heading](md041.md) offers an improved implementation. diff --git a/doc/md003.md b/doc/md003.md index d7eb98ed..19e2409e 100644 --- a/doc/md003.md +++ b/doc/md003.md @@ -6,7 +6,7 @@ Aliases: `header-style`, `heading-style` Parameters: -* `style`: Heading style (`string`, default `consistent`, values `atx` / +- `style`: Heading style (`string`, default `consistent`, values `atx` / `atx_closed` / `consistent` / `setext` / `setext_with_atx` / `setext_with_atx_closed`) diff --git a/doc/md004.md b/doc/md004.md index 3f45b7dc..398ddbe9 100644 --- a/doc/md004.md +++ b/doc/md004.md @@ -6,7 +6,7 @@ Aliases: `ul-style` Parameters: -* `style`: List style (`string`, default `consistent`, values `asterisk` / +- `style`: List style (`string`, default `consistent`, values `asterisk` / `consistent` / `dash` / `plus` / `sublist`) Fixable: Most violations can be fixed by tooling diff --git a/doc/md007.md b/doc/md007.md index 55b6d8fc..21177490 100644 --- a/doc/md007.md +++ b/doc/md007.md @@ -6,10 +6,10 @@ Aliases: `ul-indent` Parameters: -* `indent`: Spaces for indent (`integer`, default `2`) -* `start_indent`: Spaces for first level indent (when start_indented is set) +- `indent`: Spaces for indent (`integer`, default `2`) +- `start_indent`: Spaces for first level indent (when start_indented is set) (`integer`, default `2`) -* `start_indented`: Whether to indent the first level of the list (`boolean`, +- `start_indented`: Whether to indent the first level of the list (`boolean`, default `false`) Fixable: Most violations can be fixed by tooling diff --git a/doc/md009.md b/doc/md009.md index 8330c67c..2405ee4d 100644 --- a/doc/md009.md +++ b/doc/md009.md @@ -6,10 +6,10 @@ Aliases: `no-trailing-spaces` Parameters: -* `br_spaces`: Spaces for line break (`integer`, default `2`) -* `list_item_empty_lines`: Allow spaces for empty lines in list items +- `br_spaces`: Spaces for line break (`integer`, default `2`) +- `list_item_empty_lines`: Allow spaces for empty lines in list items (`boolean`, default `false`) -* `strict`: Include unnecessary breaks (`boolean`, default `false`) +- `strict`: Include unnecessary breaks (`boolean`, default `false`) Fixable: Most violations can be fixed by tooling diff --git a/doc/md010.md b/doc/md010.md index c8ed552d..ebf746da 100644 --- a/doc/md010.md +++ b/doc/md010.md @@ -6,10 +6,10 @@ Aliases: `no-hard-tabs` Parameters: -* `code_blocks`: Include code blocks (`boolean`, default `true`) -* `ignore_code_languages`: Fenced code languages to ignore (`string[]`, default +- `code_blocks`: Include code blocks (`boolean`, default `true`) +- `ignore_code_languages`: Fenced code languages to ignore (`string[]`, default `[]`) -* `spaces_per_tab`: Number of spaces for each hard tab (`integer`, default `1`) +- `spaces_per_tab`: Number of spaces for each hard tab (`integer`, default `1`) Fixable: Most violations can be fixed by tooling diff --git a/doc/md012.md b/doc/md012.md index 7cde9d98..37b7b48d 100644 --- a/doc/md012.md +++ b/doc/md012.md @@ -6,7 +6,7 @@ Aliases: `no-multiple-blanks` Parameters: -* `maximum`: Consecutive blank lines (`integer`, default `1`) +- `maximum`: Consecutive blank lines (`integer`, default `1`) Fixable: Most violations can be fixed by tooling diff --git a/doc/md013.md b/doc/md013.md index 3dbc827c..e81ea8bb 100644 --- a/doc/md013.md +++ b/doc/md013.md @@ -6,17 +6,17 @@ Aliases: `line-length` Parameters: -* `code_block_line_length`: Number of characters for code blocks (`integer`, +- `code_block_line_length`: Number of characters for code blocks (`integer`, default `80`) -* `code_blocks`: Include code blocks (`boolean`, default `true`) -* `headers`: Include headings (`boolean`, default `true`) -* `heading_line_length`: Number of characters for headings (`integer`, default +- `code_blocks`: Include code blocks (`boolean`, default `true`) +- `headers`: Include headings (`boolean`, default `true`) +- `heading_line_length`: Number of characters for headings (`integer`, default `80`) -* `headings`: Include headings (`boolean`, default `true`) -* `line_length`: Number of characters (`integer`, default `80`) -* `stern`: Stern length checking (`boolean`, default `false`) -* `strict`: Strict length checking (`boolean`, default `false`) -* `tables`: Include tables (`boolean`, default `true`) +- `headings`: Include headings (`boolean`, default `true`) +- `line_length`: Number of characters (`integer`, default `80`) +- `stern`: Stern length checking (`boolean`, default `false`) +- `strict`: Strict length checking (`boolean`, default `false`) +- `tables`: Include tables (`boolean`, default `true`) > If `headings` is not provided, `headers` (deprecated) will be used. diff --git a/doc/md022.md b/doc/md022.md index cbda4301..c8bc2b65 100644 --- a/doc/md022.md +++ b/doc/md022.md @@ -6,8 +6,8 @@ Aliases: `blanks-around-headers`, `blanks-around-headings` Parameters: -* `lines_above`: Blank lines above heading (`integer`, default `1`) -* `lines_below`: Blank lines below heading (`integer`, default `1`) +- `lines_above`: Blank lines above heading (`integer`, default `1`) +- `lines_below`: Blank lines below heading (`integer`, default `1`) Fixable: Most violations can be fixed by tooling diff --git a/doc/md024.md b/doc/md024.md index 5733eee9..45f4f9e9 100644 --- a/doc/md024.md +++ b/doc/md024.md @@ -6,9 +6,9 @@ Aliases: `no-duplicate-header`, `no-duplicate-heading` Parameters: -* `allow_different_nesting`: Only check sibling headings (`boolean`, default +- `allow_different_nesting`: Only check sibling headings (`boolean`, default `false`) -* `siblings_only`: Only check sibling headings (`boolean`, default `false`) +- `siblings_only`: Only check sibling headings (`boolean`, default `false`) This rule is triggered if there are multiple headings in the document that have the same text: diff --git a/doc/md025.md b/doc/md025.md index 6b9ca58d..87687fc7 100644 --- a/doc/md025.md +++ b/doc/md025.md @@ -6,9 +6,9 @@ Aliases: `single-h1`, `single-title` Parameters: -* `front_matter_title`: RegExp for matching title in front matter (`string`, +- `front_matter_title`: RegExp for matching title in front matter (`string`, default `^\s*title\s*[:=]`) -* `level`: Heading level (`integer`, default `1`) +- `level`: Heading level (`integer`, default `1`) This rule is triggered when a top-level heading is in use (the first line of the file is an h1 heading), and more than one h1 heading is in use in the diff --git a/doc/md026.md b/doc/md026.md index d2f2eb31..c90d131f 100644 --- a/doc/md026.md +++ b/doc/md026.md @@ -6,7 +6,7 @@ Aliases: `no-trailing-punctuation` Parameters: -* `punctuation`: Punctuation characters not allowed at end of headings +- `punctuation`: Punctuation characters not allowed at end of headings (`string`, default `.,;:!。,;:!`) Fixable: Most violations can be fixed by tooling diff --git a/doc/md029.md b/doc/md029.md index 5fb67dbc..1f00e776 100644 --- a/doc/md029.md +++ b/doc/md029.md @@ -6,7 +6,7 @@ Aliases: `ol-prefix` Parameters: -* `style`: List style (`string`, default `one_or_ordered`, values `one` / +- `style`: List style (`string`, default `one_or_ordered`, values `one` / `one_or_ordered` / `ordered` / `zero`) This rule is triggered for ordered lists that do not either start with '1.' or diff --git a/doc/md030.md b/doc/md030.md index e5667f98..31fce0a2 100644 --- a/doc/md030.md +++ b/doc/md030.md @@ -6,12 +6,12 @@ Aliases: `list-marker-space` Parameters: -* `ol_multi`: Spaces for multi-line ordered list items (`integer`, default `1`) -* `ol_single`: Spaces for single-line ordered list items (`integer`, default +- `ol_multi`: Spaces for multi-line ordered list items (`integer`, default `1`) +- `ol_single`: Spaces for single-line ordered list items (`integer`, default `1`) -* `ul_multi`: Spaces for multi-line unordered list items (`integer`, default +- `ul_multi`: Spaces for multi-line unordered list items (`integer`, default `1`) -* `ul_single`: Spaces for single-line unordered list items (`integer`, default +- `ul_single`: Spaces for single-line unordered list items (`integer`, default `1`) Fixable: Most violations can be fixed by tooling diff --git a/doc/md031.md b/doc/md031.md index ba857e7d..7dc1f857 100644 --- a/doc/md031.md +++ b/doc/md031.md @@ -6,7 +6,7 @@ Aliases: `blanks-around-fences` Parameters: -* `list_items`: Include list items (`boolean`, default `true`) +- `list_items`: Include list items (`boolean`, default `true`) Fixable: Most violations can be fixed by tooling diff --git a/doc/md033.md b/doc/md033.md index 3da981ea..d2f5ddec 100644 --- a/doc/md033.md +++ b/doc/md033.md @@ -6,7 +6,7 @@ Aliases: `no-inline-html` Parameters: -* `allowed_elements`: Allowed elements (`string[]`, default `[]`) +- `allowed_elements`: Allowed elements (`string[]`, default `[]`) This rule is triggered whenever raw HTML is used in a Markdown document: diff --git a/doc/md035.md b/doc/md035.md index 961e59e1..e3159721 100644 --- a/doc/md035.md +++ b/doc/md035.md @@ -6,7 +6,7 @@ Aliases: `hr-style` Parameters: -* `style`: Horizontal rule style (`string`, default `consistent`) +- `style`: Horizontal rule style (`string`, default `consistent`) This rule is triggered when inconsistent styles of horizontal rules are used in the document: diff --git a/doc/md036.md b/doc/md036.md index bc986c3a..795c7514 100644 --- a/doc/md036.md +++ b/doc/md036.md @@ -6,7 +6,7 @@ Aliases: `no-emphasis-as-header`, `no-emphasis-as-heading` Parameters: -* `punctuation`: Punctuation characters (`string`, default `.,;:!?。,;:!?`) +- `punctuation`: Punctuation characters (`string`, default `.,;:!?。,;:!?`) This check looks for instances where emphasized (i.e. bold or italic) text is used to separate sections, where a heading should be used instead: diff --git a/doc/md040.md b/doc/md040.md index 73a91fb5..5272fc09 100644 --- a/doc/md040.md +++ b/doc/md040.md @@ -6,8 +6,8 @@ Aliases: `fenced-code-language` Parameters: -* `allowed_languages`: List of languages (`string[]`, default `[]`) -* `language_only`: Require language only (`boolean`, default `false`) +- `allowed_languages`: List of languages (`string[]`, default `[]`) +- `language_only`: Require language only (`boolean`, default `false`) This rule is triggered when fenced code blocks are used, but a language isn't specified: diff --git a/doc/md041.md b/doc/md041.md index 1b0f5a53..24acf3f6 100644 --- a/doc/md041.md +++ b/doc/md041.md @@ -6,9 +6,9 @@ Aliases: `first-line-h1`, `first-line-heading` Parameters: -* `front_matter_title`: RegExp for matching title in front matter (`string`, +- `front_matter_title`: RegExp for matching title in front matter (`string`, default `^\s*title\s*[:=]`) -* `level`: Heading level (`integer`, default `1`) +- `level`: Heading level (`integer`, default `1`) This rule is intended to ensure documents have a title and is triggered when the first line in the file isn't a top-level (h1) heading: diff --git a/doc/md043.md b/doc/md043.md index cc044b1d..aa747352 100644 --- a/doc/md043.md +++ b/doc/md043.md @@ -6,9 +6,9 @@ Aliases: `required-headers`, `required-headings` Parameters: -* `headers`: List of headings (`string[]`, default `[]`) -* `headings`: List of headings (`string[]`, default `[]`) -* `match_case`: Match case of headings (`boolean`, default `false`) +- `headers`: List of headings (`string[]`, default `[]`) +- `headings`: List of headings (`string[]`, default `[]`) +- `match_case`: Match case of headings (`boolean`, default `false`) > If `headings` is not provided, `headers` (deprecated) will be used. diff --git a/doc/md044.md b/doc/md044.md index 36fdd2a0..1c549117 100644 --- a/doc/md044.md +++ b/doc/md044.md @@ -6,9 +6,9 @@ Aliases: `proper-names` Parameters: -* `code_blocks`: Include code blocks (`boolean`, default `true`) -* `html_elements`: Include HTML elements (`boolean`, default `true`) -* `names`: List of proper names (`string[]`, default `[]`) +- `code_blocks`: Include code blocks (`boolean`, default `true`) +- `html_elements`: Include HTML elements (`boolean`, default `true`) +- `names`: List of proper names (`string[]`, default `[]`) Fixable: Most violations can be fixed by tooling diff --git a/doc/md046.md b/doc/md046.md index 0bced7d0..835982e5 100644 --- a/doc/md046.md +++ b/doc/md046.md @@ -6,7 +6,7 @@ Aliases: `code-block-style` Parameters: -* `style`: Block style (`string`, default `consistent`, values `consistent` / +- `style`: Block style (`string`, default `consistent`, values `consistent` / `fenced` / `indented`) This rule is triggered when unwanted or different code block styles are used in diff --git a/doc/md048.md b/doc/md048.md index 7be4614b..9d4c3f13 100644 --- a/doc/md048.md +++ b/doc/md048.md @@ -6,7 +6,7 @@ Aliases: `code-fence-style` Parameters: -* `style`: Code fence style (`string`, default `consistent`, values `backtick` +- `style`: Code fence style (`string`, default `consistent`, values `backtick` / `consistent` / `tilde`) This rule is triggered when the symbols used in the document for fenced code diff --git a/doc/md049.md b/doc/md049.md index 02e98e6f..9e87d71a 100644 --- a/doc/md049.md +++ b/doc/md049.md @@ -6,7 +6,7 @@ Aliases: `emphasis-style` Parameters: -* `style`: Emphasis style should be consistent (`string`, default `consistent`, +- `style`: Emphasis style should be consistent (`string`, default `consistent`, values `asterisk` / `consistent` / `underscore`) Fixable: Most violations can be fixed by tooling diff --git a/doc/md050.md b/doc/md050.md index b737bbcd..e6106cb9 100644 --- a/doc/md050.md +++ b/doc/md050.md @@ -6,7 +6,7 @@ Aliases: `strong-style` Parameters: -* `style`: Strong style should be consistent (`string`, default `consistent`, +- `style`: Strong style should be consistent (`string`, default `consistent`, values `asterisk` / `consistent` / `underscore`) Fixable: Most violations can be fixed by tooling diff --git a/doc/md053.md b/doc/md053.md index dc39938a..e3ba599e 100644 --- a/doc/md053.md +++ b/doc/md053.md @@ -6,7 +6,7 @@ Aliases: `link-image-reference-definitions` Parameters: -* `ignored_definitions`: Ignored definitions (`string[]`, default `["//"]`) +- `ignored_definitions`: Ignored definitions (`string[]`, default `["//"]`) Fixable: Most violations can be fixed by tooling @@ -21,7 +21,7 @@ unnecessary: 1. If a label is not referenced by any link or image in a document, that definition is unused and can be deleted. -1. If a label is defined multiple times in a document, the first definition is +2. If a label is defined multiple times in a document, the first definition is used and the others can be deleted. This rule considers a reference definition to be used if any link or image @@ -33,6 +33,6 @@ be ignored by setting the `ignored_definitions` parameter. The default value of this parameter ignores the following convention for adding non-HTML comments to Markdown: -```md +```markdown [//]: # (This behaves like a comment) ``` diff --git a/helpers/README.md b/helpers/README.md index 4cd29271..5a6a1667 100644 --- a/helpers/README.md +++ b/helpers/README.md @@ -11,7 +11,7 @@ package exposes those for reuse by custom rules. ## API -_Undocumented_ - This package exports the internal functions as-is. The APIs +*Undocumented* - This package exports the internal functions as-is. The APIs were not originally meant to be public, are not officially supported, and may change from release to release. There are brief descriptive comments above each function, but no [JSDoc][jsdoc] annotations. That said, some of what's here will @@ -19,7 +19,7 @@ be useful to custom rule authors and may avoid duplicating code. ## Example -```js +```javascript const { forEachLine, getLineMetadata } = require("markdownlint-rule-helpers"); module.exports = { @@ -45,7 +45,7 @@ See also: [`markdownlint` built-in rule implementations][lib]. ## Tests -_None_ - The entire body of code is tested to 100% coverage by the core +*None* - The entire body of code is tested to 100% coverage by the core `markdownlint` project, so there are no additional tests here. [custom-rules]: https://github.com/DavidAnson/markdownlint/blob/main/doc/CustomRules.md