mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-01-10 01:48:50 +01:00
feat: implement autofix for md029
Add support for auto-fixing MD029 violations. Close #949
This commit is contained in:
parent
3532e3110a
commit
cec6c7e95d
12 changed files with 1018 additions and 177 deletions
|
|
@ -912,7 +912,7 @@ test("readme", async(t) => {
|
|||
});
|
||||
|
||||
test("validateJsonUsingConfigSchemaStrict", async(t) => {
|
||||
t.plan(209);
|
||||
t.plan(211);
|
||||
// @ts-ignore
|
||||
const ajv = new Ajv(ajvOptions);
|
||||
const validateSchemaStrict = ajv.compile(configSchemaStrict);
|
||||
|
|
|
|||
42
test/ordered-list-item-prefix-double-digits-ordered.md
Normal file
42
test/ordered-list-item-prefix-double-digits-ordered.md
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# Ordered list examples
|
||||
|
||||
Good list:
|
||||
|
||||
1. Item
|
||||
2. Item
|
||||
3. Item
|
||||
4. Item
|
||||
5. Item
|
||||
6. Item
|
||||
7. Item
|
||||
8. Item
|
||||
9. Item
|
||||
10. Item
|
||||
11. Item
|
||||
|
||||
Bad list 1:
|
||||
|
||||
1. Item
|
||||
10. Item {MD029}
|
||||
9. Item {MD029}
|
||||
|
||||
Bad list 2:
|
||||
|
||||
11. Item {MD029}
|
||||
10. Item {MD029}
|
||||
|
||||
Bad list 3
|
||||
|
||||
12. Item {MD029}
|
||||
1. Item {MD029}
|
||||
|
||||
Bad list 4:
|
||||
|
||||
0. Item
|
||||
10. Item {MD029}
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"ol-prefix": {
|
||||
"style": "ordered"
|
||||
}
|
||||
} -->
|
||||
47
test/ordered-list-item-prefix-sublists-ordered.md
Normal file
47
test/ordered-list-item-prefix-sublists-ordered.md
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
# Ordered list examples
|
||||
|
||||
Good list and sublist:
|
||||
|
||||
1. Item
|
||||
2. Item
|
||||
1. Item
|
||||
2. Item
|
||||
3. Item
|
||||
|
||||
Good list and bad sublist:
|
||||
|
||||
1. Item
|
||||
2. Item
|
||||
3. Item
|
||||
4. Item
|
||||
3. Item
|
||||
|
||||
Bad list and good sublist:
|
||||
|
||||
1. Item
|
||||
4. Item {MD029}
|
||||
1. Item
|
||||
2. Item
|
||||
5. Item {MD029}
|
||||
|
||||
Bad list and bad sublist:
|
||||
|
||||
1. Item
|
||||
4. Item {MD029}
|
||||
1. Item
|
||||
3. Item {MD029}
|
||||
5. Item {MD029}
|
||||
|
||||
Bad list and bad sublist (0):
|
||||
|
||||
0. Item
|
||||
4. Item {MD029}
|
||||
1. Item
|
||||
3. Item {MD029}
|
||||
5. Item {MD029}
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"ol-prefix": {
|
||||
"style": "ordered"
|
||||
}
|
||||
} -->
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue