If a script is entered into JSLint.com[1] containing a destructuring assignment[2], JSLint gives a strange error message[3] that has little or nothing to do...
I want to recheck some bits of older code against the everchanging good parts, and for I use rhino-jslint, I have to change the jslint-options-string again and...
var foo = [0,, 1,, 2,, 3]; There are times where you wish to leave particular indices of an array as undefined. The above fails with the following errors: ...
Every know and then I want to change a /*jslint*/ setting for a particular statement. After the statement I want to restore the setting to its previous state....
@charset "UTF-8"; div { content: counter(foo) "." attr(bar); } Three things: 1) content is only supposed to be used on the :before, ::before, :after, and...
A lot of libraries are written inside one big, anonymous wrapper function: (function () { // ... }()); As I understand from John Resig's post on "use strict"...
There are times where you absolutely must go against something JSLint is warning you about. Perhaps you need eval (rare, but it happens), or perhaps you have a...
I have this line of code: new Something(); and JSLint gives me this in its report: Error: Problem at line 7 character 9: 'new' should not be used as a...
@charset "UTF-8"; body { color: rgb(30, 144, 255); color: rgb(75%, 4%, 100%); } The above fails with the following errors: Problem at line 3 character 18:...
The following piece of code: var node = document.getElementById('foo'); delete node.parentNode.removeChild(node); Works fine, but JSLint is complaining: Error:...
One of the hazards of JavaScript is that its syntax suggests that it has block scope, but it doesn't. It only has function scope. It turns out that function...
Hi there, When I input this: function hello() { var x = 0; var y = 2; return x + y; } I get this error: Problem at line 3 character 9: Too many var statements....
Previously, the cookie JSLint used to store the settings was a rather long-lived cookie. Recently, this was changed so the cookie would expire at the end of...
"use strict"; function t() { var name, norm; name = 'js/js-js.js'; norm = name.replace(/([\.\/-])/g, ''); return name === norm; } gives me this Error: Problem...
function foo(a, b) { var c; } In the above, the local variables "a" and "b" are never used, yet they are not listed as "Unused". Instead, only "c" is listed. ...
Am I crazy? I thought I could add this comment at the top: /* global CMECF window */ And then I could reference my CMECF global (analogous to the YAHOO...
jslint complains if I use a function before it's defined, e.g.: window.onload = initialize; function initialize() { ... } I can certainly understand why one...
Most programs I write lately are wrapped in an anonymous function which is immediately executed, thus: (function () { ... the real code ... }()); As is well...
/* I'm a comment! */ @charset "UTF-8"; [hidden] { display: none !important; } The above is valid JSLint, but fails in the W3 CSS validator with the following...
var regexp = /foo|*/; The above is valid code in JSLint, but fails with the following error: Uncaught SyntaxError: Invalid regular expression: /foo|*/: Nothing...
Hi, I'm writing a Firefox extension. The frontend is CSS/XUL. Of course JSLint does not know XUL-Tags. Is there a possibility to use JSLint anyway. Like...
I'm working on setting up the frontend-test-suite(http://github.com/NeilCrosby/frontend-test-suite/tree/master) which uses jslint. The only jslint script that...
Hi, I'm not sure this is a problem, or if I'm just reading the report wrong. When creating an anonymous function (a callback) as an arg to a function: ...
With the Assume a browser setting checked, onbeforeunload=function() { return "you sure you want to leave the page?"; }; gives me a jslint Implied global...