Renamed rule fore new line at EOF from MD046 to MD047

This commit is contained in:
KitoW 2019-04-05 22:33:19 +02:00
parent 12a51da282
commit 33eaf0bdda
10 changed files with 14 additions and 14 deletions

View file

@ -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

View file

@ -1547,7 +1547,7 @@ Guidance for writing alternate text is available from the [W3C](https://www.w3.o
<a name="md045"></a>
## MD046 - New lines at the end of file
## MD047 - New lines at the end of file
Tags: blank_lines

View file

@ -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) {

View file

@ -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();

View file

@ -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
},

View file

@ -39,4 +39,4 @@ text
```
code at end of file without newline
``` {MD046}
``` {MD047}

View file

@ -72,4 +72,4 @@ code
text
* list (on last line without newline) {MD046}
* list (on last line without newline) {MD047}

View file

@ -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 }

View file

@ -1,4 +1,4 @@
{
"default": true,
"MD046": false
"MD047": false
}

View file

@ -4,4 +4,4 @@ One
Two
---
{MD043} {MD046}
{MD043} {MD047}