mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-22 00:40:12 +01:00
Convert var to const/let (except in browser-only code).
This commit is contained in:
parent
78c1af7bfd
commit
213aef4564
56 changed files with 524 additions and 518 deletions
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var shared = require("./shared");
|
||||
const shared = require("./shared");
|
||||
|
||||
module.exports = {
|
||||
"names": [ "MD012", "no-multiple-blanks" ],
|
||||
"description": "Multiple consecutive blank lines",
|
||||
"tags": [ "whitespace", "blank_lines" ],
|
||||
"function": function MD012(params, onError) {
|
||||
var maximum = params.config.maximum || 1;
|
||||
var count = 0;
|
||||
const maximum = params.config.maximum || 1;
|
||||
let count = 0;
|
||||
shared.forEachLine(function forLine(line, lineIndex, inCode) {
|
||||
count = (inCode || line.trim().length) ? 0 : count + 1;
|
||||
if (maximum < count) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue