mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +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,9 +13,9 @@ module.exports = {
|
|||
const requiredHeadings = params.config.headings || params.config.headers;
|
||||
if (Array.isArray(requiredHeadings)) {
|
||||
const levels = {};
|
||||
[ 1, 2, 3, 4, 5, 6 ].forEach((level) => {
|
||||
for (const level of [ 1, 2, 3, 4, 5, 6 ]) {
|
||||
levels["h" + level] = "######".substr(-level);
|
||||
});
|
||||
}
|
||||
let i = 0;
|
||||
let matchAny = false;
|
||||
let hasError = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue