I use JSLint and have a huge code library that is 100% pure JSLint. Starting from 1.20.2011, JSLint reports whitespacing error errors for each var statement. Take, for example, this (now hollowed out) function:
var dateStrFromTimestamp;
dateStrFromTimestamp = function (t) {
"use strict";
var a, d;
d = new Date(t * 1000);
a = [];
};
JSLint Reports:
Problem at line 1 character 5: Expected 'dateStrFromTimestamp' at column 3, not column 5.
var dateStrFromTimestamp;
Problem at line 4 character 7: Expected 'a' at column 5, not column 7.
var a, d;
How should I write my code? If I follow this recommendation, I will have to remove the space after the keyword "var" - but this cannot be. So, the current version of JSLint buggy? Or am I currently blind to something obvious?
Zhami source
share