Update MD004/ul-style to auto-fix violations (fixes #351).

This commit is contained in:
David Anson 2021-02-06 15:49:02 -08:00
parent 5aef3a4a51
commit ed325ebb56
8 changed files with 113 additions and 37 deletions

View file

@ -7,7 +7,7 @@
* Alpha
* Bravo
- Charlie
* Charlie
* Delta
* Echo

View file

@ -459,7 +459,7 @@ test("applyFix", (t) => {
});
test("applyFixes", (t) => {
t.plan(29);
t.plan(30);
const testCases = [
[
"Hello world.",
@ -905,6 +905,27 @@ test("applyFixes", (t) => {
}
],
""
],
[
" hello world",
[
{
"lineNumber": 1,
"fixInfo": {
"editColumn": 1,
"deleteCount": 1
}
},
{
"lineNumber": 1,
"fixInfo": {
"editColumn": 2,
"deleteCount": 1,
"insertText": "H"
}
}
],
"Hello world"
]
];
testCases.forEach((testCase) => {

View file

@ -1,6 +0,0 @@
{
"default": true,
"MD004": {
"style": "sublist"
}
}

View file

@ -47,12 +47,18 @@
- item
* item
* item {MD004}
+ item
+ item {MD004}
- item
* item
+ item
- item
* item
- item {MD004}
+ item
- item
+ item {MD004}
<!-- markdownlint-configure-file {
"ul-style": {
"style": "sublist"
}
} -->