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

@ -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,