mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +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
|
|
@ -10,7 +10,7 @@ module.exports = {
|
|||
params.tokens.filter(function filterToken(token) {
|
||||
return token.type === "blockquote_open";
|
||||
}).forEach(function forToken(blockquote) {
|
||||
var lines = blockquote.map[1] - blockquote.map[0];
|
||||
const lines = blockquote.map[1] - blockquote.map[0];
|
||||
onError({
|
||||
"lineNumber": blockquote.lineNumber,
|
||||
"detail": "Blockquote spans " + lines + " line(s).",
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ module.exports = {
|
|||
"description": "Rule that reports an error every N lines",
|
||||
"tags": [ "test" ],
|
||||
"function": function rule(params, onError) {
|
||||
var n = params.config.n || 2;
|
||||
const n = params.config.n || 2;
|
||||
params.lines.forEach(function forLine(line, lineIndex) {
|
||||
var lineNumber = lineIndex + 1;
|
||||
const lineNumber = lineIndex + 1;
|
||||
if ((lineNumber % n) === 0) {
|
||||
onError({
|
||||
"lineNumber": lineNumber,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ module.exports = {
|
|||
inline.children.filter(function filterChild(child) {
|
||||
return child.type === "text";
|
||||
}).forEach(function forChild(text) {
|
||||
var index = text.content.toLowerCase().indexOf("ex");
|
||||
const index = text.content.toLowerCase().indexOf("ex");
|
||||
if (index !== -1) {
|
||||
onError({
|
||||
"lineNumber": text.lineNumber,
|
||||
|
|
|
|||
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var anyBlockquote = require("./any-blockquote");
|
||||
const anyBlockquote = require("./any-blockquote");
|
||||
module.exports.anyBlockquote = anyBlockquote;
|
||||
|
||||
var everyNLines = require("./every-n-lines");
|
||||
const everyNLines = require("./every-n-lines");
|
||||
module.exports.everyNLines = everyNLines;
|
||||
|
||||
var firstLine = require("./first-line");
|
||||
const firstLine = require("./first-line");
|
||||
module.exports.firstLine = firstLine;
|
||||
|
||||
var lettersEX = require("./letters-E-X");
|
||||
const lettersEX = require("./letters-E-X");
|
||||
module.exports.lettersEX = lettersEX;
|
||||
|
||||
module.exports.all = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue