mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Renamed rule fore new line at EOF from MD046 to MD047
This commit is contained in:
parent
12a51da282
commit
33eaf0bdda
10 changed files with 14 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
},
|
||||
|
|
|
|||
|
|
@ -39,4 +39,4 @@ text
|
|||
|
||||
```
|
||||
code at end of file without newline
|
||||
``` {MD046}
|
||||
``` {MD047}
|
||||
|
|
@ -72,4 +72,4 @@ code
|
|||
|
||||
text
|
||||
|
||||
* list (on last line without newline) {MD046}
|
||||
* list (on last line without newline) {MD047}
|
||||
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD046": false
|
||||
"MD047": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ One
|
|||
Two
|
||||
---
|
||||
|
||||
{MD043} {MD046}
|
||||
{MD043} {MD047}
|
||||
Loading…
Add table
Add a link
Reference in a new issue