diff --git a/README.md b/README.md index bfc0fb3d..7ace4445 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ playground for learning and exploring. * **[MD043](doc/Rules.md#md043)** *required-headings/required-headers* - Required heading structure * **[MD044](doc/Rules.md#md044)** *proper-names* - Proper names should have the correct capitalization * **[MD045](doc/Rules.md#md045)** *no-alt-text* - Images should have alternate text (alt text) -* **[MD046](doc/Rules.md#md046)** *new-line-eof* - New lines at the end of file +* **[MD047](doc/Rules.md#md047)** *new-line-eof* - New lines at the end of file See [Rules.md](doc/Rules.md) for more details. @@ -102,7 +102,7 @@ Tags group related rules and can be used to enable/disable multiple rules at onc * **accessibility** - MD045 * **atx** - MD018, MD019 * **atx_closed** - MD020, MD021 -* **blank_lines** - MD012, MD022, MD031, MD032, MD046 +* **blank_lines** - MD012, MD022, MD031, MD032, MD047 * **blockquote** - MD027, MD028 * **bullet** - MD004, MD005, MD006, MD007, MD032 * **code** - MD014, MD031, MD038, MD040 diff --git a/doc/Rules.md b/doc/Rules.md index 3b5ce415..3a59c93b 100644 --- a/doc/Rules.md +++ b/doc/Rules.md @@ -1547,7 +1547,7 @@ Guidance for writing alternate text is available from the [W3C](https://www.w3.o -## MD046 - New lines at the end of file +## MD047 - New lines at the end of file Tags: blank_lines diff --git a/lib/md046.js b/lib/md047.js similarity index 92% rename from lib/md046.js rename to lib/md047.js index 17812573..b3f82b3a 100644 --- a/lib/md046.js +++ b/lib/md047.js @@ -6,7 +6,7 @@ const shared = require("./shared"); const { isBlankLine } = shared; module.exports = { - "names": [ "MD046", "new-line-eof" ], + "names": [ "MD047", "new-line-eof" ], "description": "New lines at the end of file", "tags": [ "blank_lines" ], "function": function rule(params, onError) { diff --git a/lib/rules.js b/lib/rules.js index 8f78449d..2013a557 100644 --- a/lib/rules.js +++ b/lib/rules.js @@ -49,7 +49,7 @@ const rules = [ require("./md043"), require("./md044"), require("./md045"), - require("./md046") + require("./md047") ]; rules.forEach((rule) => { const name = rule.names[0].toLowerCase(); diff --git a/schema/markdownlint-config-schema.json b/schema/markdownlint-config-schema.json index e6d7b77d..37863eb7 100644 --- a/schema/markdownlint-config-schema.json +++ b/schema/markdownlint-config-schema.json @@ -1255,13 +1255,13 @@ "type": "boolean", "default": true }, - "MD046": { - "description": "MD046/new-line-eof - New lines at the end of file", + "MD047": { + "description": "MD047/new-line-eof - New lines at the end of file", "type": "boolean", "default": true }, "new-line-eof": { - "description": "MD046/new-line-eof - New lines at the end of file", + "description": "MD047/new-line-eof - New lines at the end of file", "type": "boolean", "default": true }, diff --git a/test/fenced_code_without_blank_lines.md b/test/fenced_code_without_blank_lines.md index 248d4a7c..ecdf058f 100644 --- a/test/fenced_code_without_blank_lines.md +++ b/test/fenced_code_without_blank_lines.md @@ -39,4 +39,4 @@ text ``` code at end of file without newline -``` {MD046} \ No newline at end of file +``` {MD047} \ No newline at end of file diff --git a/test/lists_without_blank_lines.md b/test/lists_without_blank_lines.md index 2725b22a..6e593efe 100644 --- a/test/lists_without_blank_lines.md +++ b/test/lists_without_blank_lines.md @@ -72,4 +72,4 @@ code text -* list (on last line without newline) {MD046} \ No newline at end of file +* list (on last line without newline) {MD047} \ No newline at end of file diff --git a/test/markdownlint-test.js b/test/markdownlint-test.js index 0c696667..e28c4005 100644 --- a/test/markdownlint-test.js +++ b/test/markdownlint-test.js @@ -2730,9 +2730,9 @@ module.exports.newLineAtTheEndOfFile = const expected = { "./test/new_line_EOF.md": [ { "lineNumber": 3, - "ruleNames": [ "MD046", "new-line-eof" ], + "ruleNames": [ "MD047", "new-line-eof" ], "ruleDescription": "New lines at the end of file", - "ruleInformation": `${homepage}/blob/v${version}/doc/Rules.md#md046`, + "ruleInformation": `${homepage}/blob/v${version}/doc/Rules.md#md047`, "errorDetail": "file does not end with new line", "errorContext": null, "errorRange": null } diff --git a/test/new_line_EOF.json b/test/new_line_EOF.json index 8ab95915..4970b843 100644 --- a/test/new_line_EOF.json +++ b/test/new_line_EOF.json @@ -1,4 +1,4 @@ { "default": true, - "MD046": false + "MD047": false } diff --git a/test/required-headings-missing-last.md b/test/required-headings-missing-last.md index b81f72b8..a9b30cda 100644 --- a/test/required-headings-missing-last.md +++ b/test/required-headings-missing-last.md @@ -4,4 +4,4 @@ One Two --- -{MD043} {MD046} \ No newline at end of file +{MD043} {MD047} \ No newline at end of file