Convert var to const/let (except in browser-only code).

This commit is contained in:
David Anson 2018-04-27 22:05:34 -07:00
parent 78c1af7bfd
commit 213aef4564
56 changed files with 524 additions and 518 deletions

View file

@ -2,17 +2,17 @@
"use strict";
var shared = require("./shared");
const shared = require("./shared");
var tabRe = /\t+/;
const tabRe = /\t+/;
module.exports = {
"names": [ "MD010", "no-hard-tabs" ],
"description": "Hard tabs",
"tags": [ "whitespace", "hard_tab" ],
"function": function MD010(params, onError) {
var codeBlocks = params.config.code_blocks;
var includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
const codeBlocks = params.config.code_blocks;
const includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
shared.forEachLine(function forLine(line, lineIndex, inCode) {
if (tabRe.test(line) && (!inCode || includeCodeBlocks)) {
shared.addError(onError, lineIndex + 1,