mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Enable ESLint rule unicorn/no-array-for-each, auto-fix all violations, manually address new issues for ~4% time reduction measured via profile-fixture.mjs on Apple Silicon M1.
This commit is contained in:
parent
15efcb4282
commit
b6471fba31
34 changed files with 414 additions and 389 deletions
|
|
@ -13,7 +13,8 @@ module.exports = {
|
|||
"tags": [ "bullet", "ul", "ol", "blank_lines" ],
|
||||
"function": function MD032(params, onError) {
|
||||
const { lines } = params;
|
||||
flattenedLists().filter((list) => !list.nesting).forEach((list) => {
|
||||
const filteredLists = flattenedLists().filter((list) => !list.nesting);
|
||||
for (const list of filteredLists) {
|
||||
const firstIndex = list.open.map[0];
|
||||
if (!isBlankLine(lines[firstIndex - 1])) {
|
||||
const line = lines[firstIndex];
|
||||
|
|
@ -45,6 +46,6 @@ module.exports = {
|
|||
"insertText": `${quotePrefix}\n`
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue