mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-18 06:50: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
|
|
@ -11,12 +11,12 @@ module.exports = {
|
|||
"description": "Inconsistent indentation for list items at the same level",
|
||||
"tags": [ "bullet", "ul", "indentation" ],
|
||||
"function": function MD005(params, onError) {
|
||||
flattenedLists().forEach((list) => {
|
||||
for (const list of flattenedLists()) {
|
||||
const expectedIndent = list.indent;
|
||||
let expectedEnd = 0;
|
||||
let actualEnd = -1;
|
||||
let endMatching = false;
|
||||
list.items.forEach((item) => {
|
||||
for (const item of list.items) {
|
||||
const { line, lineNumber } = item;
|
||||
const actualIndent = indentFor(item);
|
||||
let match = null;
|
||||
|
|
@ -63,7 +63,7 @@ module.exports = {
|
|||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue