mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-21 16:30: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
|
|
@ -58,11 +58,11 @@ module.exports = {
|
|||
const linkOnlyLineNumbers = [];
|
||||
filterTokens(params, "inline", (token) => {
|
||||
let childTokenTypes = "";
|
||||
token.children.forEach((child) => {
|
||||
for (const child of token.children) {
|
||||
if (child.type !== "text" || child.content !== "") {
|
||||
childTokenTypes += tokenTypeMap[child.type] || "x";
|
||||
}
|
||||
});
|
||||
}
|
||||
if (linkOrImageOnlyLineRe.test(childTokenTypes)) {
|
||||
linkOnlyLineNumbers.push(token.lineNumber);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue