If I need to create an array with a specified length, and the length is a literal, JSLint is happy enough with this: var arr = new Array(50); If, however, the...
I can understand how . and [^...] might be dangerous in a "match" regular expression, but in a replace I cannot see the harm in them. My typical example would...
On Mr Crockford's Remedial JavaScript page: http://javascript.crockford.com/remedial.html near the bottom, there is a little function called 'supplant39; that ...
I expect jslint to accept the following two-line code snippet, but instead it gives the error "Unexpected '['". What am I doing wrong? ===JSLINT INPUT=== var a...
Whilst reviewing some code, I spotted an unnecessary use of call and it stood out to me as a good candidate for a warning. The following code demonstrates the...
Erik Meijer talking about the hazards and other interesting things. http://channel9.msdn.com/posts/Erik-Meijer-Functional-Programming-From-First-Principles...
Hi, I have a module which toggles two group of event handlers : // structure (function () { "use strict"; function a() {} function b() {} function c() {b(c);...
The "node" option specifies that __dirname and __filename are valid options, yet if you don't use the "nomen" option it will still error. Shouldn't the "nomen"...
Some compressors do not touch the initial comments of a file in order to leave copyright, license etc. in place. I find that useful. However, some of my files...
In the case I repeat the same identifier on a catch block I receive an "'identifier' is already defined" error message. try { } catch (exception) { } ... try {...
While I don't mind the new rule, I have run into a case where the suggested replacement style code doesn't work. For example suppose we have a page that uses...
How do I add the exception to this "check" both globally or in a single line of code, for example: if (typeof var === 'undefined39;) { //many lines of code here ...
Even if you allow multiple var declaration, JSLint stops when if finds a variable defined within a for (). The problem is not so much that it reports an issue...
I had difficulty finding an up-to-date version of jslint.js that worked from the commandline and was easy to set up, so I wrote one myself. It's a short ruby...
While I'm not sure anyone would consider mixing single and double quotes to be an error (or look like an error, or be more error prone), mixing them does...
Hi, I've just starting using jslint and it's been very helpful. Thanks for making it available. For better or worse it combines what I'd call "correctness...
Iterating over an array backwards like: /*jslint plusplus: true */ var ii, foo = []; for (ii = foo.length; --ii;) { foo.push("hello"); } produces the error...
JSLint now warns when properties contain the substring 'Sync'. The use of that substring in Nodejs is to identify methods that can cause blockage. Such methods...
Hi, Not sure if anyone has requested this before, but a common cause of bugs and even more often, maintainence issues, arise because a programmer thinks of a...
Love the new site layout! One request: Can you make the width of the site fixed at the width of the browser window? If a line of code is wider than the window,...