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,15 +2,15 @@
"use strict";
var shared = require("./shared");
const shared = require("./shared");
module.exports = {
"names": [ "MD002", "first-heading-h1", "first-header-h1" ],
"description": "First heading should be a top level heading",
"tags": [ "headings", "headers" ],
"function": function MD002(params, onError) {
var level = params.config.level || 1;
var tag = "h" + level;
const level = params.config.level || 1;
const tag = "h" + level;
params.tokens.every(function forToken(token) {
if (token.type === "heading_open") {
shared.addErrorDetailIf(onError, token.lineNumber, tag, token.tag);