Add lint rules from eslint-plugin-unicorn.

This commit is contained in:
David Anson 2020-09-06 20:34:10 -07:00
parent 0f4745efe3
commit 5ab938a6ab
11 changed files with 96 additions and 31 deletions

View file

@ -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);