mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-24 01:40:13 +01:00
Add lint rules from eslint-plugin-unicorn.
This commit is contained in:
parent
0f4745efe3
commit
5ab938a6ab
11 changed files with 96 additions and 31 deletions
|
|
@ -11,7 +11,7 @@ module.exports = {
|
|||
"function": function MD001(params, onError) {
|
||||
let prevLevel = 0;
|
||||
filterTokens(params, "heading_open", function forToken(token) {
|
||||
const level = parseInt(token.tag.slice(1), 10);
|
||||
const level = Number.parseInt(token.tag.slice(1), 10);
|
||||
if (prevLevel && (level > prevLevel)) {
|
||||
addErrorDetailIf(onError, token.lineNumber,
|
||||
"h" + (prevLevel + 1), "h" + level);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue