diff --git a/README.md b/README.md index 79a2c526..6feb0eb3 100644 --- a/README.md +++ b/README.md @@ -86,8 +86,8 @@ playground for learning and exploring. -- **[MD001](doc/md001.md)** *heading-increment/header-increment* - Heading levels should only increment by one level at a time -- **[MD003](doc/md003.md)** *heading-style/header-style* - Heading style +- **[MD001](doc/md001.md)** *heading-increment* - Heading levels should only increment by one level at a time +- **[MD003](doc/md003.md)** *heading-style* - Heading style - **[MD004](doc/md004.md)** *ul-style* - Unordered list style - **[MD005](doc/md005.md)** *list-indent* - Inconsistent indentation for list items at the same level - **[MD007](doc/md007.md)** *ul-indent* - Unordered list indentation @@ -101,9 +101,9 @@ playground for learning and exploring. - **[MD019](doc/md019.md)** *no-multiple-space-atx* - Multiple spaces after hash on atx style heading - **[MD020](doc/md020.md)** *no-missing-space-closed-atx* - No space inside hashes on closed atx style heading - **[MD021](doc/md021.md)** *no-multiple-space-closed-atx* - Multiple spaces inside hashes on closed atx style heading -- **[MD022](doc/md022.md)** *blanks-around-headings/blanks-around-headers* - Headings should be surrounded by blank lines -- **[MD023](doc/md023.md)** *heading-start-left/header-start-left* - Headings must start at the beginning of the line -- **[MD024](doc/md024.md)** *no-duplicate-heading/no-duplicate-header* - Multiple headings with the same content +- **[MD022](doc/md022.md)** *blanks-around-headings* - Headings should be surrounded by blank lines +- **[MD023](doc/md023.md)** *heading-start-left* - Headings must start at the beginning of the line +- **[MD024](doc/md024.md)** *no-duplicate-heading* - Multiple headings with the same content - **[MD025](doc/md025.md)** *single-title/single-h1* - Multiple top-level headings in the same document - **[MD026](doc/md026.md)** *no-trailing-punctuation* - Trailing punctuation in heading - **[MD027](doc/md027.md)** *no-multiple-space-blockquote* - Multiple spaces after blockquote symbol @@ -115,14 +115,14 @@ playground for learning and exploring. - **[MD033](doc/md033.md)** *no-inline-html* - Inline HTML - **[MD034](doc/md034.md)** *no-bare-urls* - Bare URL used - **[MD035](doc/md035.md)** *hr-style* - Horizontal rule style -- **[MD036](doc/md036.md)** *no-emphasis-as-heading/no-emphasis-as-header* - Emphasis used instead of a heading +- **[MD036](doc/md036.md)** *no-emphasis-as-heading* - Emphasis used instead of a heading - **[MD037](doc/md037.md)** *no-space-in-emphasis* - Spaces inside emphasis markers - **[MD038](doc/md038.md)** *no-space-in-code* - Spaces inside code span elements - **[MD039](doc/md039.md)** *no-space-in-links* - Spaces inside link text - **[MD040](doc/md040.md)** *fenced-code-language* - Fenced code blocks should have a language specified - **[MD041](doc/md041.md)** *first-line-heading/first-line-h1* - First line in a file should be a top-level heading - **[MD042](doc/md042.md)** *no-empty-links* - No empty links -- **[MD043](doc/md043.md)** *required-headings/required-headers* - Required heading structure +- **[MD043](doc/md043.md)** *required-headings* - Required heading structure - **[MD044](doc/md044.md)** *proper-names* - Proper names should have the correct capitalization - **[MD045](doc/md045.md)** *no-alt-text* - Images should have alternate text (alt text) - **[MD046](doc/md046.md)** *code-block-style* - Code block style @@ -139,10 +139,6 @@ playground for learning and exploring. See [Rules.md](doc/Rules.md) for more details. -> All rules with `heading` as part of their name are also available as `header` -> aliases (e.g. `heading-increment` is also available as `header-increment`). -> The use of `header` is deprecated and provided for backward-compatibility. - ### Custom Rules In addition to built-in rules, custom rules can be used to address @@ -166,8 +162,6 @@ rules at once. - **`code`** - `MD014`, `MD031`, `MD038`, `MD040`, `MD046`, `MD048` - **`emphasis`** - `MD036`, `MD037`, `MD049`, `MD050` - **`hard_tab`** - `MD010` -- **`headers`** - `MD001`, `MD003`, `MD018`, `MD019`, `MD020`, `MD021`, `MD022`, - `MD023`, `MD024`, `MD025`, `MD026`, `MD036`, `MD041`, `MD043` - **`headings`** - `MD001`, `MD003`, `MD018`, `MD019`, `MD020`, `MD021`, `MD022`, `MD023`, `MD024`, `MD025`, `MD026`, `MD036`, `MD041`, `MD043` - **`hr`** - `MD035` diff --git a/demo/markdownlint-browser.js b/demo/markdownlint-browser.js index 8c4a914b..6687b81d 100644 --- a/demo/markdownlint-browser.js +++ b/demo/markdownlint-browser.js @@ -3237,9 +3237,9 @@ var _require = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _require.addErrorDetailIf, filterTokens = _require.filterTokens; module.exports = { - "names": ["MD001", "heading-increment", "header-increment"], + "names": ["MD001", "heading-increment"], "description": "Heading levels should only increment by one level at a time", - "tags": ["headings", "headers"], + "tags": ["headings"], "function": function MD001(params, onError) { var prevLevel = 0; filterTokens(params, "heading_open", function forToken(token) { @@ -3270,9 +3270,9 @@ var _require = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), filterTokens = _require.filterTokens, headingStyleFor = _require.headingStyleFor; module.exports = { - "names": ["MD003", "heading-style", "header-style"], + "names": ["MD003", "heading-style"], "description": "Heading style", - "tags": ["headings", "headers"], + "tags": ["headings"], "function": function MD003(params, onError) { var style = String(params.config.style || "consistent"); filterTokens(params, "heading_open", function forToken(token) { @@ -3887,9 +3887,6 @@ module.exports = { var tables = params.config.tables; var includeTables = tables === undefined ? true : !!tables; var headings = params.config.headings; - if (headings === undefined) { - headings = params.config.headers; - } var includeHeadings = headings === undefined ? true : !!headings; var headingLineNumbers = []; forEachHeading(params, function (heading) { @@ -4027,7 +4024,7 @@ var _require2 = __webpack_require__(/*! ./cache */ "../lib/cache.js"), module.exports = { "names": ["MD018", "no-missing-space-atx"], "description": "No space after hash on atx style heading", - "tags": ["headings", "headers", "atx", "spaces"], + "tags": ["headings", "atx", "spaces"], "function": function MD018(params, onError) { forEachLine(lineMetadata(), function (line, lineIndex, inCode) { if (!inCode && /^#+[^# \t]/.test(line) && !/#\s*$/.test(line) && !line.startsWith("#️⃣")) { @@ -4067,7 +4064,7 @@ var _require = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), module.exports = { "names": ["MD019", "no-multiple-space-atx"], "description": "Multiple spaces after hash on atx style heading", - "tags": ["headings", "headers", "atx", "spaces"], + "tags": ["headings", "atx", "spaces"], "function": function MD019(params, onError) { filterTokens(params, "heading_open", function (token) { if (headingStyleFor(token) === "atx") { @@ -4115,7 +4112,7 @@ var _require2 = __webpack_require__(/*! ./cache */ "../lib/cache.js"), module.exports = { "names": ["MD020", "no-missing-space-closed-atx"], "description": "No space inside hashes on closed atx style heading", - "tags": ["headings", "headers", "atx_closed", "spaces"], + "tags": ["headings", "atx_closed", "spaces"], "function": function MD020(params, onError) { forEachLine(lineMetadata(), function (line, lineIndex, inCode) { if (!inCode) { @@ -4175,7 +4172,7 @@ var closedAtxRe = /^(#+)([ \t]+)([^ \t]|[^ \t].*[^ \t])([ \t]+)(#+)(\s*)$/; module.exports = { "names": ["MD021", "no-multiple-space-closed-atx"], "description": "Multiple spaces inside hashes on closed atx style heading", - "tags": ["headings", "headers", "atx_closed", "spaces"], + "tags": ["headings", "atx_closed", "spaces"], "function": function MD021(params, onError) { filterTokens(params, "heading_open", function (token) { if (headingStyleFor(token) === "atx_closed") { @@ -4275,9 +4272,9 @@ var getBlockQuote = function getBlockQuote(str, count) { .concat("\n").repeat(count); }; module.exports = { - "names": ["MD022", "blanks-around-headings", "blanks-around-headers"], + "names": ["MD022", "blanks-around-headings"], "description": "Headings should be surrounded by blank lines", - "tags": ["headings", "headers", "blank_lines"], + "tags": ["headings", "blank_lines"], "function": function MD022(params, onError) { var getLinesAbove = getLinesFunction(params.config.lines_above); var getLinesBelow = getLinesFunction(params.config.lines_below); @@ -4352,9 +4349,9 @@ var _require = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), filterTokens = _require.filterTokens; var spaceBeforeHeadingRe = /^(\s+|[>\s]+\s\s)[^>\s]/; module.exports = { - "names": ["MD023", "heading-start-left", "header-start-left"], + "names": ["MD023", "heading-start-left"], "description": "Headings must start at the beginning of the line", - "tags": ["headings", "headers", "spaces"], + "tags": ["headings", "spaces"], "function": function MD023(params, onError) { filterTokens(params, "heading_open", function forToken(token) { var lineNumber = token.lineNumber, @@ -4395,9 +4392,9 @@ var _require = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _require.addErrorContext, forEachHeading = _require.forEachHeading; module.exports = { - "names": ["MD024", "no-duplicate-heading", "no-duplicate-header"], + "names": ["MD024", "no-duplicate-heading"], "description": "Multiple headings with the same content", - "tags": ["headings", "headers"], + "tags": ["headings"], "function": function MD024(params, onError) { var siblingsOnly = !!params.config.siblings_only || !!params.config.allow_different_nesting || false; var knownContents = [null, []]; @@ -4445,7 +4442,7 @@ var _require = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), module.exports = { "names": ["MD025", "single-title", "single-h1"], "description": "Multiple top-level headings in the same document", - "tags": ["headings", "headers"], + "tags": ["headings"], "function": function MD025(params, onError) { var level = Number(params.config.level || 1); var tag = "h" + level; @@ -4490,7 +4487,7 @@ var _require2 = __webpack_require__(/*! ../helpers/micromark.cjs */ "../helpers/ module.exports = { "names": ["MD026", "no-trailing-punctuation"], "description": "Trailing punctuation in heading", - "tags": ["headings", "headers"], + "tags": ["headings"], "function": function MD026(params, onError) { var punctuation = params.config.punctuation; punctuation = String(punctuation === undefined ? allPunctuationNoQuestion : punctuation); @@ -5186,9 +5183,9 @@ var _require = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _require.addErrorContext, allPunctuation = _require.allPunctuation; module.exports = { - "names": ["MD036", "no-emphasis-as-heading", "no-emphasis-as-header"], + "names": ["MD036", "no-emphasis-as-heading"], "description": "Emphasis used instead of a heading", - "tags": ["headings", "headers", "emphasis"], + "tags": ["headings", "emphasis"], "function": function MD036(params, onError) { var punctuation = params.config.punctuation; punctuation = String(punctuation === undefined ? allPunctuation : punctuation); @@ -5610,7 +5607,7 @@ var _require = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), module.exports = { "names": ["MD041", "first-line-heading", "first-line-h1"], "description": "First line in a file should be a top-level heading", - "tags": ["headings", "headers"], + "tags": ["headings"], "function": function MD041(params, onError) { var level = Number(params.config.level || 1); var tag = "h" + level; @@ -5735,11 +5732,11 @@ var _require = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _require.addErrorDetailIf, forEachHeading = _require.forEachHeading; module.exports = { - "names": ["MD043", "required-headings", "required-headers"], + "names": ["MD043", "required-headings"], "description": "Required heading structure", - "tags": ["headings", "headers"], + "tags": ["headings"], "function": function MD043(params, onError) { - var requiredHeadings = params.config.headings || params.config.headers; + var requiredHeadings = params.config.headings; if (!Array.isArray(requiredHeadings)) { // Nothing to check; avoid doing any work return; diff --git a/doc-build/md013.md b/doc-build/md013.md index 22675a87..525f0c41 100644 --- a/doc-build/md013.md +++ b/doc-build/md013.md @@ -1,5 +1,3 @@ -> If `headings` is not provided, `headers` (deprecated) will be used. - This rule is triggered when there are lines that are longer than the configured `line_length` (default: 80 characters). To fix this, split the line up into multiple lines. To set a different maximum length for headings, use diff --git a/doc-build/md043.md b/doc-build/md043.md index 249580a3..04c98e15 100644 --- a/doc-build/md043.md +++ b/doc-build/md043.md @@ -1,5 +1,3 @@ -> If `headings` is not provided, `headers` (deprecated) will be used. - This rule is triggered when the headings in a file do not match the array of headings passed to the rule. It can be used to enforce a standard heading structure for a set of files. diff --git a/doc/Rules.md b/doc/Rules.md index 5b75acb1..36a15681 100644 --- a/doc/Rules.md +++ b/doc/Rules.md @@ -8,9 +8,9 @@ versions of the examples. ## `MD001` - Heading levels should only increment by one level at a time -Tags: `headers`, `headings` +Tags: `headings` -Aliases: `header-increment`, `heading-increment` +Aliases: `heading-increment` This rule is triggered when you skip heading levels in a Markdown document, for example: @@ -48,9 +48,9 @@ when skipped - especially for accessibility scenarios. More information: ## `MD003` - Heading style -Tags: `headers`, `headings` +Tags: `headings` -Aliases: `header-style`, `heading-style` +Aliases: `heading-style` Parameters: @@ -469,7 +469,6 @@ Parameters: - `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 `80`) - `headings`: Include headings (`boolean`, default `true`) @@ -478,8 +477,6 @@ Parameters: - `strict`: Strict length checking (`boolean`, default `false`) - `tables`: Include tables (`boolean`, default `true`) -> If `headings` is not provided, `headers` (deprecated) will be used. - This rule is triggered when there are lines that are longer than the configured `line_length` (default: 80 characters). To fix this, split the line up into multiple lines. To set a different maximum length for headings, use @@ -580,7 +577,7 @@ for more information. ## `MD018` - No space after hash on atx style heading -Tags: `atx`, `headers`, `headings`, `spaces` +Tags: `atx`, `headings`, `spaces` Aliases: `no-missing-space-atx` @@ -610,7 +607,7 @@ Rationale: Violations of this rule can lead to improperly rendered content. ## `MD019` - Multiple spaces after hash on atx style heading -Tags: `atx`, `headers`, `headings`, `spaces` +Tags: `atx`, `headings`, `spaces` Aliases: `no-multiple-space-atx` @@ -641,7 +638,7 @@ content. ## `MD020` - No space inside hashes on closed atx style heading -Tags: `atx_closed`, `headers`, `headings`, `spaces` +Tags: `atx_closed`, `headings`, `spaces` Aliases: `no-missing-space-closed-atx` @@ -673,7 +670,7 @@ Rationale: Violations of this rule can lead to improperly rendered content. ## `MD021` - Multiple spaces inside hashes on closed atx style heading -Tags: `atx_closed`, `headers`, `headings`, `spaces` +Tags: `atx_closed`, `headings`, `spaces` Aliases: `no-multiple-space-closed-atx` @@ -707,9 +704,9 @@ content. ## `MD022` - Headings should be surrounded by blank lines -Tags: `blank_lines`, `headers`, `headings` +Tags: `blank_lines`, `headings` -Aliases: `blanks-around-headers`, `blanks-around-headings` +Aliases: `blanks-around-headings` Parameters: @@ -762,9 +759,9 @@ as regular text. ## `MD023` - Headings must start at the beginning of the line -Tags: `headers`, `headings`, `spaces` +Tags: `headings`, `spaces` -Aliases: `header-start-left`, `heading-start-left` +Aliases: `heading-start-left` Fixable: Some violations can be fixed by tooling @@ -798,9 +795,9 @@ parsed as headings, and will instead appear as regular text. ## `MD024` - Multiple headings with the same content -Tags: `headers`, `headings` +Tags: `headings` -Aliases: `no-duplicate-header`, `no-duplicate-heading` +Aliases: `no-duplicate-heading` Parameters: @@ -848,7 +845,7 @@ heading name; headings with the same content can cause problems with that. ## `MD025` - Multiple top-level headings in the same document -Tags: `headers`, `headings` +Tags: `headings` Aliases: `single-h1`, `single-title` @@ -900,7 +897,7 @@ be contained within this heading. ## `MD026` - Trailing punctuation in heading -Tags: `headers`, `headings` +Tags: `headings` Aliases: `no-trailing-punctuation` @@ -1438,9 +1435,9 @@ Rationale: Consistent formatting makes it easier to understand a document. ## `MD036` - Emphasis used instead of a heading -Tags: `emphasis`, `headers`, `headings` +Tags: `emphasis`, `headings` -Aliases: `no-emphasis-as-header`, `no-emphasis-as-heading` +Aliases: `no-emphasis-as-heading` Parameters: @@ -1648,7 +1645,7 @@ correct syntax highlighting for code. More information: ## `MD041` - First line in a file should be a top-level heading -Tags: `headers`, `headings` +Tags: `headings` Aliases: `first-line-h1`, `first-line-heading` @@ -1735,18 +1732,15 @@ links. ## `MD043` - Required heading structure -Tags: `headers`, `headings` +Tags: `headings` -Aliases: `required-headers`, `required-headings` +Aliases: `required-headings` Parameters: -- `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. - This rule is triggered when the headings in a file do not match the array of headings passed to the rule. It can be used to enforce a standard heading structure for a set of files. diff --git a/doc/md001.md b/doc/md001.md index eeb8811e..72eff271 100644 --- a/doc/md001.md +++ b/doc/md001.md @@ -1,8 +1,8 @@ # `MD001` - Heading levels should only increment by one level at a time -Tags: `headers`, `headings` +Tags: `headings` -Aliases: `header-increment`, `heading-increment` +Aliases: `heading-increment` This rule is triggered when you skip heading levels in a Markdown document, for example: diff --git a/doc/md003.md b/doc/md003.md index f9e9380a..31cf739f 100644 --- a/doc/md003.md +++ b/doc/md003.md @@ -1,8 +1,8 @@ # `MD003` - Heading style -Tags: `headers`, `headings` +Tags: `headings` -Aliases: `header-style`, `heading-style` +Aliases: `heading-style` Parameters: diff --git a/doc/md013.md b/doc/md013.md index e81ea8bb..7c33891e 100644 --- a/doc/md013.md +++ b/doc/md013.md @@ -9,7 +9,6 @@ Parameters: - `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 `80`) - `headings`: Include headings (`boolean`, default `true`) @@ -18,8 +17,6 @@ Parameters: - `strict`: Strict length checking (`boolean`, default `false`) - `tables`: Include tables (`boolean`, default `true`) -> If `headings` is not provided, `headers` (deprecated) will be used. - This rule is triggered when there are lines that are longer than the configured `line_length` (default: 80 characters). To fix this, split the line up into multiple lines. To set a different maximum length for headings, use diff --git a/doc/md018.md b/doc/md018.md index ea7c604a..870297a8 100644 --- a/doc/md018.md +++ b/doc/md018.md @@ -1,6 +1,6 @@ # `MD018` - No space after hash on atx style heading -Tags: `atx`, `headers`, `headings`, `spaces` +Tags: `atx`, `headings`, `spaces` Aliases: `no-missing-space-atx` diff --git a/doc/md019.md b/doc/md019.md index b87bc1b3..4bcb44f6 100644 --- a/doc/md019.md +++ b/doc/md019.md @@ -1,6 +1,6 @@ # `MD019` - Multiple spaces after hash on atx style heading -Tags: `atx`, `headers`, `headings`, `spaces` +Tags: `atx`, `headings`, `spaces` Aliases: `no-multiple-space-atx` diff --git a/doc/md020.md b/doc/md020.md index 6df939eb..f711b260 100644 --- a/doc/md020.md +++ b/doc/md020.md @@ -1,6 +1,6 @@ # `MD020` - No space inside hashes on closed atx style heading -Tags: `atx_closed`, `headers`, `headings`, `spaces` +Tags: `atx_closed`, `headings`, `spaces` Aliases: `no-missing-space-closed-atx` diff --git a/doc/md021.md b/doc/md021.md index d6e22b29..5aa99a61 100644 --- a/doc/md021.md +++ b/doc/md021.md @@ -1,6 +1,6 @@ # `MD021` - Multiple spaces inside hashes on closed atx style heading -Tags: `atx_closed`, `headers`, `headings`, `spaces` +Tags: `atx_closed`, `headings`, `spaces` Aliases: `no-multiple-space-closed-atx` diff --git a/doc/md022.md b/doc/md022.md index 906cb5fe..c05edcc0 100644 --- a/doc/md022.md +++ b/doc/md022.md @@ -1,8 +1,8 @@ # `MD022` - Headings should be surrounded by blank lines -Tags: `blank_lines`, `headers`, `headings` +Tags: `blank_lines`, `headings` -Aliases: `blanks-around-headers`, `blanks-around-headings` +Aliases: `blanks-around-headings` Parameters: diff --git a/doc/md023.md b/doc/md023.md index 458295c3..1644451b 100644 --- a/doc/md023.md +++ b/doc/md023.md @@ -1,8 +1,8 @@ # `MD023` - Headings must start at the beginning of the line -Tags: `headers`, `headings`, `spaces` +Tags: `headings`, `spaces` -Aliases: `header-start-left`, `heading-start-left` +Aliases: `heading-start-left` Fixable: Some violations can be fixed by tooling diff --git a/doc/md024.md b/doc/md024.md index 45f4f9e9..bed159c6 100644 --- a/doc/md024.md +++ b/doc/md024.md @@ -1,8 +1,8 @@ # `MD024` - Multiple headings with the same content -Tags: `headers`, `headings` +Tags: `headings` -Aliases: `no-duplicate-header`, `no-duplicate-heading` +Aliases: `no-duplicate-heading` Parameters: diff --git a/doc/md025.md b/doc/md025.md index 87687fc7..7c764b33 100644 --- a/doc/md025.md +++ b/doc/md025.md @@ -1,6 +1,6 @@ # `MD025` - Multiple top-level headings in the same document -Tags: `headers`, `headings` +Tags: `headings` Aliases: `single-h1`, `single-title` diff --git a/doc/md026.md b/doc/md026.md index 2a2968ad..cf7161cd 100644 --- a/doc/md026.md +++ b/doc/md026.md @@ -1,6 +1,6 @@ # `MD026` - Trailing punctuation in heading -Tags: `headers`, `headings` +Tags: `headings` Aliases: `no-trailing-punctuation` diff --git a/doc/md036.md b/doc/md036.md index 795c7514..1518904f 100644 --- a/doc/md036.md +++ b/doc/md036.md @@ -1,8 +1,8 @@ # `MD036` - Emphasis used instead of a heading -Tags: `emphasis`, `headers`, `headings` +Tags: `emphasis`, `headings` -Aliases: `no-emphasis-as-header`, `no-emphasis-as-heading` +Aliases: `no-emphasis-as-heading` Parameters: diff --git a/doc/md041.md b/doc/md041.md index 24acf3f6..5dfeee13 100644 --- a/doc/md041.md +++ b/doc/md041.md @@ -1,6 +1,6 @@ # `MD041` - First line in a file should be a top-level heading -Tags: `headers`, `headings` +Tags: `headings` Aliases: `first-line-h1`, `first-line-heading` diff --git a/doc/md043.md b/doc/md043.md index aa747352..8d626701 100644 --- a/doc/md043.md +++ b/doc/md043.md @@ -1,17 +1,14 @@ # `MD043` - Required heading structure -Tags: `headers`, `headings` +Tags: `headings` -Aliases: `required-headers`, `required-headings` +Aliases: `required-headings` Parameters: -- `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. - This rule is triggered when the headings in a file do not match the array of headings passed to the rule. It can be used to enforce a standard heading structure for a set of files. diff --git a/lib/configuration.d.ts b/lib/configuration.d.ts index 9427e9bc..42c85f51 100644 --- a/lib/configuration.d.ts +++ b/lib/configuration.d.ts @@ -19,19 +19,15 @@ export interface Configuration { */ $schema?: string; /** - * MD001/heading-increment/header-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md001.md + * MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md001.md */ MD001?: boolean; /** - * MD001/heading-increment/header-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md001.md + * MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md001.md */ "heading-increment"?: boolean; /** - * MD001/heading-increment/header-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md001.md - */ - "header-increment"?: boolean; - /** - * MD003/heading-style/header-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md003.md + * MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md003.md */ MD003?: | boolean @@ -42,7 +38,7 @@ export interface Configuration { style?: "consistent" | "atx" | "atx_closed" | "setext" | "setext_with_atx" | "setext_with_atx_closed"; }; /** - * MD003/heading-style/header-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md003.md + * MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md003.md */ "heading-style"?: | boolean @@ -52,17 +48,6 @@ export interface Configuration { */ style?: "consistent" | "atx" | "atx_closed" | "setext" | "setext_with_atx" | "setext_with_atx_closed"; }; - /** - * MD003/heading-style/header-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md003.md - */ - "header-style"?: - | boolean - | { - /** - * Heading style - */ - style?: "consistent" | "atx" | "atx_closed" | "setext" | "setext_with_atx" | "setext_with_atx_closed"; - }; /** * MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md004.md */ @@ -267,10 +252,6 @@ export interface Configuration { * Include headings */ headings?: boolean; - /** - * Include headings - */ - headers?: boolean; /** * Strict length checking */ @@ -310,10 +291,6 @@ export interface Configuration { * Include headings */ headings?: boolean; - /** - * Include headings - */ - headers?: boolean; /** * Strict length checking */ @@ -364,7 +341,7 @@ export interface Configuration { */ "no-multiple-space-closed-atx"?: boolean; /** - * MD022/blanks-around-headings/blanks-around-headers : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md022.md + * MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md022.md */ MD022?: | boolean @@ -379,7 +356,7 @@ export interface Configuration { lines_below?: number | number[]; }; /** - * MD022/blanks-around-headings/blanks-around-headers : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md022.md + * MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md022.md */ "blanks-around-headings"?: | boolean @@ -394,34 +371,15 @@ export interface Configuration { lines_below?: number | number[]; }; /** - * MD022/blanks-around-headings/blanks-around-headers : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md022.md - */ - "blanks-around-headers"?: - | boolean - | { - /** - * Blank lines above heading - */ - lines_above?: number | number[]; - /** - * Blank lines below heading - */ - lines_below?: number | number[]; - }; - /** - * MD023/heading-start-left/header-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md023.md + * MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md023.md */ MD023?: boolean; /** - * MD023/heading-start-left/header-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md023.md + * MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md023.md */ "heading-start-left"?: boolean; /** - * MD023/heading-start-left/header-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md023.md - */ - "header-start-left"?: boolean; - /** - * MD024/no-duplicate-heading/no-duplicate-header : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md024.md + * MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md024.md */ MD024?: | boolean @@ -436,7 +394,7 @@ export interface Configuration { siblings_only?: boolean; }; /** - * MD024/no-duplicate-heading/no-duplicate-header : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md024.md + * MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md024.md */ "no-duplicate-heading"?: | boolean @@ -450,21 +408,6 @@ export interface Configuration { */ siblings_only?: boolean; }; - /** - * MD024/no-duplicate-heading/no-duplicate-header : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md024.md - */ - "no-duplicate-header"?: - | boolean - | { - /** - * Only check sibling headings - */ - allow_different_nesting?: boolean; - /** - * Only check sibling headings - */ - siblings_only?: boolean; - }; /** * MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md025.md */ @@ -699,7 +642,7 @@ export interface Configuration { style?: string; }; /** - * MD036/no-emphasis-as-heading/no-emphasis-as-header : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md036.md + * MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md036.md */ MD036?: | boolean @@ -710,7 +653,7 @@ export interface Configuration { punctuation?: string; }; /** - * MD036/no-emphasis-as-heading/no-emphasis-as-header : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md036.md + * MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md036.md */ "no-emphasis-as-heading"?: | boolean @@ -720,17 +663,6 @@ export interface Configuration { */ punctuation?: string; }; - /** - * MD036/no-emphasis-as-heading/no-emphasis-as-header : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md036.md - */ - "no-emphasis-as-header"?: - | boolean - | { - /** - * Punctuation characters - */ - punctuation?: string; - }; /** * MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md037.md */ @@ -839,7 +771,7 @@ export interface Configuration { */ "no-empty-links"?: boolean; /** - * MD043/required-headings/required-headers : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md043.md + * MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md043.md */ MD043?: | boolean @@ -848,17 +780,13 @@ export interface Configuration { * List of headings */ headings?: string[]; - /** - * List of headings - */ - headers?: string[]; /** * Match case of headings */ match_case?: boolean; }; /** - * MD043/required-headings/required-headers : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md043.md + * MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md043.md */ "required-headings"?: | boolean @@ -867,29 +795,6 @@ export interface Configuration { * List of headings */ headings?: string[]; - /** - * List of headings - */ - headers?: string[]; - /** - * Match case of headings - */ - match_case?: boolean; - }; - /** - * MD043/required-headings/required-headers : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md043.md - */ - "required-headers"?: - | boolean - | { - /** - * List of headings - */ - headings?: string[]; - /** - * List of headings - */ - headers?: string[]; /** * Match case of headings */ @@ -1131,10 +1036,6 @@ export interface Configuration { * headings : MD001, MD003, MD018, MD019, MD020, MD021, MD022, MD023, MD024, MD025, MD026, MD036, MD041, MD043 */ headings?: boolean; - /** - * headers : MD001, MD003, MD018, MD019, MD020, MD021, MD022, MD023, MD024, MD025, MD026, MD036, MD041, MD043 - */ - headers?: boolean; /** * bullet : MD004, MD005, MD007, MD032 */ diff --git a/lib/md001.js b/lib/md001.js index 698caeea..7e3c721d 100644 --- a/lib/md001.js +++ b/lib/md001.js @@ -5,9 +5,9 @@ const { addErrorDetailIf, filterTokens } = require("../helpers"); module.exports = { - "names": [ "MD001", "heading-increment", "header-increment" ], + "names": [ "MD001", "heading-increment" ], "description": "Heading levels should only increment by one level at a time", - "tags": [ "headings", "headers" ], + "tags": [ "headings" ], "function": function MD001(params, onError) { let prevLevel = 0; filterTokens(params, "heading_open", function forToken(token) { diff --git a/lib/md003.js b/lib/md003.js index 6a57824c..299464a5 100644 --- a/lib/md003.js +++ b/lib/md003.js @@ -6,9 +6,9 @@ const { addErrorDetailIf, filterTokens, headingStyleFor } = require("../helpers"); module.exports = { - "names": [ "MD003", "heading-style", "header-style" ], + "names": [ "MD003", "heading-style" ], "description": "Heading style", - "tags": [ "headings", "headers" ], + "tags": [ "headings" ], "function": function MD003(params, onError) { let style = String(params.config.style || "consistent"); filterTokens(params, "heading_open", function forToken(token) { diff --git a/lib/md013.js b/lib/md013.js index 925f31db..89300085 100644 --- a/lib/md013.js +++ b/lib/md013.js @@ -46,10 +46,7 @@ module.exports = { const includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks; const tables = params.config.tables; const includeTables = (tables === undefined) ? true : !!tables; - let headings = params.config.headings; - if (headings === undefined) { - headings = params.config.headers; - } + const headings = params.config.headings; const includeHeadings = (headings === undefined) ? true : !!headings; const headingLineNumbers = []; forEachHeading(params, (heading) => { diff --git a/lib/md018.js b/lib/md018.js index 01e967d7..e62727d8 100644 --- a/lib/md018.js +++ b/lib/md018.js @@ -8,7 +8,7 @@ const { lineMetadata } = require("./cache"); module.exports = { "names": [ "MD018", "no-missing-space-atx" ], "description": "No space after hash on atx style heading", - "tags": [ "headings", "headers", "atx", "spaces" ], + "tags": [ "headings", "atx", "spaces" ], "function": function MD018(params, onError) { forEachLine(lineMetadata(), (line, lineIndex, inCode) => { if (!inCode && diff --git a/lib/md019.js b/lib/md019.js index b7d34355..60431e25 100644 --- a/lib/md019.js +++ b/lib/md019.js @@ -8,7 +8,7 @@ const { addErrorContext, filterTokens, headingStyleFor } = module.exports = { "names": [ "MD019", "no-multiple-space-atx" ], "description": "Multiple spaces after hash on atx style heading", - "tags": [ "headings", "headers", "atx", "spaces" ], + "tags": [ "headings", "atx", "spaces" ], "function": function MD019(params, onError) { filterTokens(params, "heading_open", (token) => { if (headingStyleFor(token) === "atx") { diff --git a/lib/md020.js b/lib/md020.js index 7de4e9ad..f712cc84 100644 --- a/lib/md020.js +++ b/lib/md020.js @@ -8,7 +8,7 @@ const { lineMetadata } = require("./cache"); module.exports = { "names": [ "MD020", "no-missing-space-closed-atx" ], "description": "No space inside hashes on closed atx style heading", - "tags": [ "headings", "headers", "atx_closed", "spaces" ], + "tags": [ "headings", "atx_closed", "spaces" ], "function": function MD020(params, onError) { forEachLine(lineMetadata(), (line, lineIndex, inCode) => { if (!inCode) { diff --git a/lib/md021.js b/lib/md021.js index 130daf24..0a6033fb 100644 --- a/lib/md021.js +++ b/lib/md021.js @@ -10,7 +10,7 @@ const closedAtxRe = /^(#+)([ \t]+)([^ \t]|[^ \t].*[^ \t])([ \t]+)(#+)(\s*)$/; module.exports = { "names": [ "MD021", "no-multiple-space-closed-atx" ], "description": "Multiple spaces inside hashes on closed atx style heading", - "tags": [ "headings", "headers", "atx_closed", "spaces" ], + "tags": [ "headings", "atx_closed", "spaces" ], "function": function MD021(params, onError) { filterTokens(params, "heading_open", (token) => { if (headingStyleFor(token) === "atx_closed") { diff --git a/lib/md022.js b/lib/md022.js index 62d5b0fc..abbb2e67 100644 --- a/lib/md022.js +++ b/lib/md022.js @@ -32,9 +32,9 @@ const getBlockQuote = (str, count) => ( ); module.exports = { - "names": [ "MD022", "blanks-around-headings", "blanks-around-headers" ], + "names": [ "MD022", "blanks-around-headings" ], "description": "Headings should be surrounded by blank lines", - "tags": [ "headings", "headers", "blank_lines" ], + "tags": [ "headings", "blank_lines" ], "function": function MD022(params, onError) { const getLinesAbove = getLinesFunction(params.config.lines_above); const getLinesBelow = getLinesFunction(params.config.lines_below); diff --git a/lib/md023.js b/lib/md023.js index ee7ace27..6a845ff0 100644 --- a/lib/md023.js +++ b/lib/md023.js @@ -7,9 +7,9 @@ const { addErrorContext, filterTokens } = require("../helpers"); const spaceBeforeHeadingRe = /^(\s+|[>\s]+\s\s)[^>\s]/; module.exports = { - "names": [ "MD023", "heading-start-left", "header-start-left" ], + "names": [ "MD023", "heading-start-left" ], "description": "Headings must start at the beginning of the line", - "tags": [ "headings", "headers", "spaces" ], + "tags": [ "headings", "spaces" ], "function": function MD023(params, onError) { filterTokens(params, "heading_open", function forToken(token) { const { lineNumber, line } = token; diff --git a/lib/md024.js b/lib/md024.js index 9bca5f77..943d9d36 100644 --- a/lib/md024.js +++ b/lib/md024.js @@ -5,9 +5,9 @@ const { addErrorContext, forEachHeading } = require("../helpers"); module.exports = { - "names": [ "MD024", "no-duplicate-heading", "no-duplicate-header" ], + "names": [ "MD024", "no-duplicate-heading" ], "description": "Multiple headings with the same content", - "tags": [ "headings", "headers" ], + "tags": [ "headings" ], "function": function MD024(params, onError) { const siblingsOnly = !!params.config.siblings_only || !!params.config.allow_different_nesting || false; diff --git a/lib/md025.js b/lib/md025.js index 04e9e3cd..a419fb0b 100644 --- a/lib/md025.js +++ b/lib/md025.js @@ -8,7 +8,7 @@ const { addErrorContext, filterTokens, frontMatterHasTitle } = module.exports = { "names": [ "MD025", "single-title", "single-h1" ], "description": "Multiple top-level headings in the same document", - "tags": [ "headings", "headers" ], + "tags": [ "headings" ], "function": function MD025(params, onError) { const level = Number(params.config.level || 1); const tag = "h" + level; diff --git a/lib/md026.js b/lib/md026.js index b059d2d8..758d891b 100644 --- a/lib/md026.js +++ b/lib/md026.js @@ -10,7 +10,7 @@ const { filterByTypes } = require("../helpers/micromark.cjs"); module.exports = { "names": [ "MD026", "no-trailing-punctuation" ], "description": "Trailing punctuation in heading", - "tags": [ "headings", "headers" ], + "tags": [ "headings" ], "function": function MD026(params, onError) { let punctuation = params.config.punctuation; punctuation = String( diff --git a/lib/md036.js b/lib/md036.js index 5151ae2e..51703247 100644 --- a/lib/md036.js +++ b/lib/md036.js @@ -5,9 +5,9 @@ const { addErrorContext, allPunctuation } = require("../helpers"); module.exports = { - "names": [ "MD036", "no-emphasis-as-heading", "no-emphasis-as-header" ], + "names": [ "MD036", "no-emphasis-as-heading" ], "description": "Emphasis used instead of a heading", - "tags": [ "headings", "headers", "emphasis" ], + "tags": [ "headings", "emphasis" ], "function": function MD036(params, onError) { let punctuation = params.config.punctuation; punctuation = diff --git a/lib/md041.js b/lib/md041.js index 340d906a..86d3c722 100644 --- a/lib/md041.js +++ b/lib/md041.js @@ -7,7 +7,7 @@ const { addErrorContext, frontMatterHasTitle } = require("../helpers"); module.exports = { "names": [ "MD041", "first-line-heading", "first-line-h1" ], "description": "First line in a file should be a top-level heading", - "tags": [ "headings", "headers" ], + "tags": [ "headings" ], "function": function MD041(params, onError) { const level = Number(params.config.level || 1); const tag = "h" + level; diff --git a/lib/md043.js b/lib/md043.js index 2b740837..9bb214d3 100644 --- a/lib/md043.js +++ b/lib/md043.js @@ -6,11 +6,11 @@ const { addErrorContext, addErrorDetailIf, forEachHeading } = require("../helpers"); module.exports = { - "names": [ "MD043", "required-headings", "required-headers" ], + "names": [ "MD043", "required-headings" ], "description": "Required heading structure", - "tags": [ "headings", "headers" ], + "tags": [ "headings" ], "function": function MD043(params, onError) { - const requiredHeadings = params.config.headings || params.config.headers; + const requiredHeadings = params.config.headings; if (!Array.isArray(requiredHeadings)) { // Nothing to check; avoid doing any work return; diff --git a/schema/.markdownlint.jsonc b/schema/.markdownlint.jsonc index e20a7c4d..3240a3cc 100644 --- a/schema/.markdownlint.jsonc +++ b/schema/.markdownlint.jsonc @@ -7,10 +7,10 @@ // Path to configuration file to extend "extends": null, - // MD001/heading-increment/header-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md001.md + // MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md001.md "MD001": true, - // MD003/heading-style/header-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md003.md + // MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md003.md "MD003": { // Heading style "style": "consistent" @@ -78,8 +78,6 @@ "tables": true, // Include headings "headings": true, - // Include headings - "headers": true, // Strict length checking "strict": false, // Stern length checking @@ -101,7 +99,7 @@ // MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md021.md "MD021": true, - // MD022/blanks-around-headings/blanks-around-headers : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md022.md + // MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md022.md "MD022": { // Blank lines above heading "lines_above": 1, @@ -109,10 +107,10 @@ "lines_below": 1 }, - // MD023/heading-start-left/header-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md023.md + // MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md023.md "MD023": true, - // MD024/no-duplicate-heading/no-duplicate-header : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md024.md + // MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md024.md "MD024": { // Only check sibling headings "allow_different_nesting": false, @@ -182,7 +180,7 @@ "style": "consistent" }, - // MD036/no-emphasis-as-heading/no-emphasis-as-header : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md036.md + // MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md036.md "MD036": { // Punctuation characters "punctuation": ".,;:!?。,;:!?" @@ -216,12 +214,10 @@ // MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md042.md "MD042": true, - // MD043/required-headings/required-headers : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md043.md + // MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md043.md "MD043": { // List of headings "headings": [], - // List of headings - "headers": [], // Match case of headings "match_case": false }, diff --git a/schema/.markdownlint.yaml b/schema/.markdownlint.yaml index 2c54d23d..6bdd1f96 100644 --- a/schema/.markdownlint.yaml +++ b/schema/.markdownlint.yaml @@ -6,10 +6,10 @@ default: true # Path to configuration file to extend extends: null -# MD001/heading-increment/header-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md001.md +# MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md001.md MD001: true -# MD003/heading-style/header-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md003.md +# MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md003.md MD003: # Heading style style: "consistent" @@ -71,8 +71,6 @@ MD013: tables: true # Include headings headings: true - # Include headings - headers: true # Strict length checking strict: false # Stern length checking @@ -93,17 +91,17 @@ MD020: true # MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md021.md MD021: true -# MD022/blanks-around-headings/blanks-around-headers : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md022.md +# MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md022.md MD022: # Blank lines above heading lines_above: 1 # Blank lines below heading lines_below: 1 -# MD023/heading-start-left/header-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md023.md +# MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md023.md MD023: true -# MD024/no-duplicate-heading/no-duplicate-header : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md024.md +# MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md024.md MD024: # Only check sibling headings allow_different_nesting: false @@ -165,7 +163,7 @@ MD035: # Horizontal rule style style: "consistent" -# MD036/no-emphasis-as-heading/no-emphasis-as-header : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md036.md +# MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md036.md MD036: # Punctuation characters punctuation: ".,;:!?。,;:!?" @@ -196,12 +194,10 @@ MD041: # MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md042.md MD042: true -# MD043/required-headings/required-headers : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md043.md +# MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md043.md MD043: # List of headings headings: [] - # List of headings - headers: [] # Match case of headings match_case: false diff --git a/schema/build-config-schema.js b/schema/build-config-schema.js index 972eacb4..4b6b11f4 100644 --- a/schema/build-config-schema.js +++ b/schema/build-config-schema.js @@ -201,11 +201,6 @@ for (const rule of rules) { "type": "boolean", "default": true }, - "headers": { - "description": "Include headings", - "type": "boolean", - "default": true - }, "strict": { "description": "Strict length checking", "type": "boolean", @@ -396,15 +391,6 @@ for (const rule of rules) { }, "default": [] }, - "headers": { - "description": "List of headings", - "type": "array", - "items": { - "type": "string", - "pattern": "^(\\*|\\+|#{1,6} .*)$" - }, - "default": [] - }, "match_case": { "description": "Match case of headings", "type": "boolean", diff --git a/schema/markdownlint-config-schema.json b/schema/markdownlint-config-schema.json index ea72bea7..9cec879d 100644 --- a/schema/markdownlint-config-schema.json +++ b/schema/markdownlint-config-schema.json @@ -22,22 +22,17 @@ "default": "https://raw.githubusercontent.com/DavidAnson/markdownlint/main/schema/markdownlint-config-schema.json" }, "MD001": { - "description": "MD001/heading-increment/header-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md001.md", + "description": "MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md001.md", "type": "boolean", "default": true }, "heading-increment": { - "description": "MD001/heading-increment/header-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md001.md", - "type": "boolean", - "default": true - }, - "header-increment": { - "description": "MD001/heading-increment/header-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md001.md", + "description": "MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md001.md", "type": "boolean", "default": true }, "MD003": { - "description": "MD003/heading-style/header-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md003.md", + "description": "MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md003.md", "type": [ "boolean", "object" @@ -61,31 +56,7 @@ "additionalProperties": false }, "heading-style": { - "description": "MD003/heading-style/header-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md003.md", - "type": [ - "boolean", - "object" - ], - "default": true, - "properties": { - "style": { - "description": "Heading style", - "type": "string", - "enum": [ - "consistent", - "atx", - "atx_closed", - "setext", - "setext_with_atx", - "setext_with_atx_closed" - ], - "default": "consistent" - } - }, - "additionalProperties": false - }, - "header-style": { - "description": "MD003/heading-style/header-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md003.md", + "description": "MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md003.md", "type": [ "boolean", "object" @@ -419,11 +390,6 @@ "type": "boolean", "default": true }, - "headers": { - "description": "Include headings", - "type": "boolean", - "default": true - }, "strict": { "description": "Strict length checking", "type": "boolean", @@ -478,11 +444,6 @@ "type": "boolean", "default": true }, - "headers": { - "description": "Include headings", - "type": "boolean", - "default": true - }, "strict": { "description": "Strict length checking", "type": "boolean", @@ -547,7 +508,7 @@ "default": true }, "MD022": { - "description": "MD022/blanks-around-headings/blanks-around-headers : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md022.md", + "description": "MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md022.md", "type": [ "boolean", "object" @@ -582,42 +543,7 @@ "additionalProperties": false }, "blanks-around-headings": { - "description": "MD022/blanks-around-headings/blanks-around-headers : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md022.md", - "type": [ - "boolean", - "object" - ], - "default": true, - "properties": { - "lines_above": { - "description": "Blank lines above heading", - "type": [ - "integer", - "array" - ], - "items": { - "type": "integer" - }, - "minimum": -1, - "default": 1 - }, - "lines_below": { - "description": "Blank lines below heading", - "type": [ - "integer", - "array" - ], - "items": { - "type": "integer" - }, - "minimum": -1, - "default": 1 - } - }, - "additionalProperties": false - }, - "blanks-around-headers": { - "description": "MD022/blanks-around-headings/blanks-around-headers : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md022.md", + "description": "MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md022.md", "type": [ "boolean", "object" @@ -652,22 +578,17 @@ "additionalProperties": false }, "MD023": { - "description": "MD023/heading-start-left/header-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md023.md", + "description": "MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md023.md", "type": "boolean", "default": true }, "heading-start-left": { - "description": "MD023/heading-start-left/header-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md023.md", - "type": "boolean", - "default": true - }, - "header-start-left": { - "description": "MD023/heading-start-left/header-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md023.md", + "description": "MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md023.md", "type": "boolean", "default": true }, "MD024": { - "description": "MD024/no-duplicate-heading/no-duplicate-header : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md024.md", + "description": "MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md024.md", "type": [ "boolean", "object" @@ -688,28 +609,7 @@ "additionalProperties": false }, "no-duplicate-heading": { - "description": "MD024/no-duplicate-heading/no-duplicate-header : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md024.md", - "type": [ - "boolean", - "object" - ], - "default": true, - "properties": { - "allow_different_nesting": { - "description": "Only check sibling headings", - "type": "boolean", - "default": false - }, - "siblings_only": { - "description": "Only check sibling headings", - "type": "boolean", - "default": false - } - }, - "additionalProperties": false - }, - "no-duplicate-header": { - "description": "MD024/no-duplicate-heading/no-duplicate-header : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md024.md", + "description": "MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md024.md", "type": [ "boolean", "object" @@ -1087,7 +987,7 @@ "additionalProperties": false }, "MD036": { - "description": "MD036/no-emphasis-as-heading/no-emphasis-as-header : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md036.md", + "description": "MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md036.md", "type": [ "boolean", "object" @@ -1103,23 +1003,7 @@ "additionalProperties": false }, "no-emphasis-as-heading": { - "description": "MD036/no-emphasis-as-heading/no-emphasis-as-header : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md036.md", - "type": [ - "boolean", - "object" - ], - "default": true, - "properties": { - "punctuation": { - "description": "Punctuation characters", - "type": "string", - "default": ".,;:!?。,;:!?" - } - }, - "additionalProperties": false - }, - "no-emphasis-as-header": { - "description": "MD036/no-emphasis-as-heading/no-emphasis-as-header : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md036.md", + "description": "MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md036.md", "type": [ "boolean", "object" @@ -1292,7 +1176,7 @@ "default": true }, "MD043": { - "description": "MD043/required-headings/required-headers : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md043.md", + "description": "MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md043.md", "type": [ "boolean", "object" @@ -1308,15 +1192,6 @@ }, "default": [] }, - "headers": { - "description": "List of headings", - "type": "array", - "items": { - "type": "string", - "pattern": "^(\\*|\\+|#{1,6} .*)$" - }, - "default": [] - }, "match_case": { "description": "Match case of headings", "type": "boolean", @@ -1326,7 +1201,7 @@ "additionalProperties": false }, "required-headings": { - "description": "MD043/required-headings/required-headers : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md043.md", + "description": "MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md043.md", "type": [ "boolean", "object" @@ -1342,49 +1217,6 @@ }, "default": [] }, - "headers": { - "description": "List of headings", - "type": "array", - "items": { - "type": "string", - "pattern": "^(\\*|\\+|#{1,6} .*)$" - }, - "default": [] - }, - "match_case": { - "description": "Match case of headings", - "type": "boolean", - "default": false - } - }, - "additionalProperties": false - }, - "required-headers": { - "description": "MD043/required-headings/required-headers : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md043.md", - "type": [ - "boolean", - "object" - ], - "default": true, - "properties": { - "headings": { - "description": "List of headings", - "type": "array", - "items": { - "type": "string", - "pattern": "^(\\*|\\+|#{1,6} .*)$" - }, - "default": [] - }, - "headers": { - "description": "List of headings", - "type": "array", - "items": { - "type": "string", - "pattern": "^(\\*|\\+|#{1,6} .*)$" - }, - "default": [] - }, "match_case": { "description": "Match case of headings", "type": "boolean", @@ -1780,11 +1612,6 @@ "type": "boolean", "default": true }, - "headers": { - "description": "headers : MD001, MD003, MD018, MD019, MD020, MD021, MD022, MD023, MD024, MD025, MD026, MD036, MD041, MD043", - "type": "boolean", - "default": true - }, "bullet": { "description": "bullet : MD004, MD005, MD007, MD032", "type": "boolean", diff --git a/test/markdownlint-test-result-object.js b/test/markdownlint-test-result-object.js index 2192faf2..675df4c2 100644 --- a/test/markdownlint-test-result-object.js +++ b/test/markdownlint-test-result-object.js @@ -606,7 +606,7 @@ test("frontMatterResultVersion3", (t) => new Promise((resolve) => { { "lineNumber": 3, "ruleNames": - [ "MD022", "blanks-around-headings", "blanks-around-headers" ], + [ "MD022", "blanks-around-headings" ], "ruleDescription": "Headings should be surrounded by blank lines", "ruleInformation": `${homepage}/blob/v${version}/doc/md022.md`, diff --git a/test/markdownlint-test.js b/test/markdownlint-test.js index 866e6f1a..beadffc8 100644 --- a/test/markdownlint-test.js +++ b/test/markdownlint-test.js @@ -840,7 +840,7 @@ test("customFileSystemAsync", (t) => new Promise((resolve) => { })); test("readme", async(t) => { - t.plan(122); + t.plan(121); const tagToRules = {}; for (const rule of rules) { for (const tag of rule.tags) { diff --git a/test/snapshots/markdownlint-test-scenarios.js.md b/test/snapshots/markdownlint-test-scenarios.js.md index 59b4584e..17cda607 100644 --- a/test/snapshots/markdownlint-test-scenarios.js.md +++ b/test/snapshots/markdownlint-test-scenarios.js.md @@ -102,7 +102,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD001', 'heading-increment', - 'header-increment', ], }, { @@ -116,7 +115,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -620,7 +618,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -640,7 +637,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD023', 'heading-start-left', - 'header-start-left', ], }, { @@ -654,7 +650,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD024', 'no-duplicate-heading', - 'no-duplicate-header', ], }, { @@ -1064,7 +1059,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD036', 'no-emphasis-as-heading', - 'no-emphasis-as-header', ], }, { @@ -1742,7 +1736,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD043', 'required-headings', - 'required-headers', ], }, { @@ -2804,7 +2797,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -2818,7 +2810,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -2832,7 +2823,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -4197,7 +4187,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, ], @@ -4259,7 +4248,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -4278,7 +4266,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, ], @@ -4341,7 +4328,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, ], @@ -4404,7 +4390,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -4422,7 +4407,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, ], @@ -4489,7 +4473,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -4506,7 +4489,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -4524,7 +4506,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -4541,7 +4522,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -4559,7 +4539,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -4578,7 +4557,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -4595,7 +4573,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -4612,7 +4589,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -4632,7 +4608,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -4649,7 +4624,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -4666,7 +4640,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -4684,7 +4657,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, ], @@ -4854,7 +4826,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -4871,7 +4842,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -4888,7 +4858,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -4906,7 +4875,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, ], @@ -5033,7 +5001,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5051,7 +5018,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5068,7 +5034,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5086,7 +5051,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5103,7 +5067,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5121,7 +5084,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5138,7 +5100,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5156,7 +5117,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5174,7 +5134,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5191,7 +5150,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5208,7 +5166,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5226,7 +5183,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5243,7 +5199,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5261,7 +5216,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5278,7 +5232,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5296,7 +5249,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5313,7 +5265,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5331,7 +5282,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -5351,7 +5301,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD023', 'heading-start-left', - 'header-start-left', ], }, { @@ -5371,7 +5320,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD023', 'heading-start-left', - 'header-start-left', ], }, { @@ -6504,7 +6452,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD001', 'heading-increment', - 'header-increment', ], }, { @@ -6518,7 +6465,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -6532,7 +6478,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -6812,7 +6757,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -6832,7 +6776,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD023', 'heading-start-left', - 'header-start-left', ], }, { @@ -6846,7 +6789,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD024', 'no-duplicate-heading', - 'no-duplicate-header', ], }, { @@ -7062,7 +7004,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD036', 'no-emphasis-as-heading', - 'no-emphasis-as-header', ], }, { @@ -7178,7 +7119,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD043', 'required-headings', - 'required-headers', ], }, { @@ -10871,7 +10811,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD036', 'no-emphasis-as-heading', - 'no-emphasis-as-header', ], }, { @@ -10885,7 +10824,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD036', 'no-emphasis-as-heading', - 'no-emphasis-as-header', ], }, { @@ -10899,7 +10837,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD036', 'no-emphasis-as-heading', - 'no-emphasis-as-header', ], }, { @@ -10913,7 +10850,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD036', 'no-emphasis-as-heading', - 'no-emphasis-as-header', ], }, { @@ -12714,7 +12650,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -12731,7 +12666,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -12985,7 +12919,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, ], @@ -14230,7 +14163,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD001', 'heading-increment', - 'header-increment', ], }, { @@ -14244,7 +14176,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD024', 'no-duplicate-heading', - 'no-duplicate-header', ], }, { @@ -14258,7 +14189,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD024', 'no-duplicate-heading', - 'no-duplicate-header', ], }, { @@ -14272,7 +14202,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD024', 'no-duplicate-heading', - 'no-duplicate-header', ], }, { @@ -14286,7 +14215,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD024', 'no-duplicate-heading', - 'no-duplicate-header', ], }, { @@ -14300,7 +14228,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD024', 'no-duplicate-heading', - 'no-duplicate-header', ], }, { @@ -14314,7 +14241,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD024', 'no-duplicate-heading', - 'no-duplicate-header', ], }, { @@ -14328,7 +14254,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD024', 'no-duplicate-heading', - 'no-duplicate-header', ], }, { @@ -14342,7 +14267,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD024', 'no-duplicate-heading', - 'no-duplicate-header', ], }, { @@ -14356,7 +14280,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD024', 'no-duplicate-heading', - 'no-duplicate-header', ], }, { @@ -14553,7 +14476,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD024', 'no-duplicate-heading', - 'no-duplicate-header', ], }, { @@ -14567,7 +14489,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD024', 'no-duplicate-heading', - 'no-duplicate-header', ], }, ], @@ -14628,7 +14549,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD024', 'no-duplicate-heading', - 'no-duplicate-header', ], }, ], @@ -15580,7 +15500,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD001', 'heading-increment', - 'header-increment', ], }, { @@ -15594,7 +15513,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD001', 'heading-increment', - 'header-increment', ], }, ], @@ -15639,7 +15557,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -15653,7 +15570,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, ], @@ -15694,7 +15610,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -15708,7 +15623,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, ], @@ -15774,7 +15688,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -15791,7 +15704,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -15809,7 +15721,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -15826,7 +15737,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, ], @@ -15870,7 +15780,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -15887,7 +15796,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -15905,7 +15813,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -15922,7 +15829,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -15940,7 +15846,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -16013,7 +15918,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -16031,7 +15935,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -16048,7 +15951,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -16068,7 +15970,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD023', 'heading-start-left', - 'header-start-left', ], }, { @@ -16088,7 +15989,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD023', 'heading-start-left', - 'header-start-left', ], }, { @@ -16108,7 +16008,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD023', 'heading-start-left', - 'header-start-left', ], }, { @@ -16128,7 +16027,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD023', 'heading-start-left', - 'header-start-left', ], }, { @@ -16148,7 +16046,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD023', 'heading-start-left', - 'header-start-left', ], }, ], @@ -19505,7 +19402,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -19519,7 +19415,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, ], @@ -19555,7 +19450,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -19569,7 +19463,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, ], @@ -19605,7 +19498,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -19619,7 +19511,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, ], @@ -23416,7 +23307,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD001', 'heading-increment', - 'header-increment', ], }, { @@ -23470,7 +23360,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD001', 'heading-increment', - 'header-increment', ], }, { @@ -34768,7 +34657,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -34901,7 +34789,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -34919,7 +34806,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD022', 'blanks-around-headings', - 'blanks-around-headers', ], }, { @@ -35158,7 +35044,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -35172,7 +35057,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -35186,7 +35070,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -35200,7 +35083,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -35436,7 +35318,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD036', 'no-emphasis-as-heading', - 'no-emphasis-as-header', ], }, { @@ -35450,7 +35331,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD036', 'no-emphasis-as-heading', - 'no-emphasis-as-header', ], }, ], @@ -36283,7 +36163,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -36297,7 +36176,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, ], @@ -36327,7 +36205,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -36341,7 +36218,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, ], @@ -36371,7 +36247,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, { @@ -36385,7 +36260,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD003', 'heading-style', - 'header-style', ], }, ], @@ -42480,7 +42354,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD043', 'required-headings', - 'required-headers', ], }, ], @@ -42520,7 +42393,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD043', 'required-headings', - 'required-headers', ], }, ], @@ -42573,7 +42445,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD043', 'required-headings', - 'required-headers', ], }, { @@ -42634,7 +42505,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD043', 'required-headings', - 'required-headers', ], }, ], @@ -42687,7 +42557,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD001', 'heading-increment', - 'header-increment', ], }, { @@ -42701,7 +42570,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD043', 'required-headings', - 'required-headers', ], }, ], @@ -42741,7 +42609,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD043', 'required-headings', - 'required-headers', ], }, ], @@ -42802,7 +42669,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD043', 'required-headings', - 'required-headers', ], }, ], @@ -42837,7 +42703,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD043', 'required-headings', - 'required-headers', ], }, ], @@ -42999,7 +42864,6 @@ Generated by [AVA](https://avajs.dev). ruleNames: [ 'MD043', 'required-headings', - 'required-headers', ], }, ], @@ -49987,7 +49851,6 @@ Generated by [AVA](https://avajs.dev). "line-length": {␊ "code_block_line_length": "80",␊ "code_blocks": 1,␊ - "headers": 1,␊ "heading_line_length": "80",␊ "headings": 1,␊ "line_length": "80",␊ @@ -50035,7 +49898,6 @@ Generated by [AVA](https://avajs.dev). "level": "1"␊ },␊ "required-headings": {␊ - "headers": 0,␊ "headings": 0␊ },␊ "proper-names": {␊ diff --git a/test/snapshots/markdownlint-test-scenarios.js.snap b/test/snapshots/markdownlint-test-scenarios.js.snap index 6fb91f30..255674b2 100644 Binary files a/test/snapshots/markdownlint-test-scenarios.js.snap and b/test/snapshots/markdownlint-test-scenarios.js.snap differ diff --git a/test/wrong-types-in-config-file.md b/test/wrong-types-in-config-file.md index 6463b69f..a3d9f32e 100644 --- a/test/wrong-types-in-config-file.md +++ b/test/wrong-types-in-config-file.md @@ -27,7 +27,6 @@ Long line long line long line long line long line long line long line long line "line-length": { "code_block_line_length": "80", "code_blocks": 1, - "headers": 1, "heading_line_length": "80", "headings": 1, "line_length": "80", @@ -75,7 +74,6 @@ Long line long line long line long line long line long line long line long line "level": "1" }, "required-headings": { - "headers": 0, "headings": 0 }, "proper-names": {