Hi Doug, I was curious as to why using "_" in identifiers (e.g. to convey that a function might be private as opposed to be publicly accessible) is considered...
There is a new option, Tolerate ES5 syntax. If you check this option, JSLint will accept the new get/set syntax in object literals. It will require that the...
Chained functions are quite popular and offer some flexibility, with a sometimes lack of readability. Currently, JSLint will accept this as accurately...
Hi Team JSLint, I understand the reluctance (or lack of time!) for jslint to officially support javascript getters and setters. And I was a bit too lazy to...
Why does JSLint complain when a function argument is used as variable in a for in loop? ex: (function () { var foo = function (bar) { var o = {}; for (bar in...
How about a little lighthearted fun at the expense of our favorite guru? http://crockfordfacts.com/ My favorite fact so far: "Douglas Crockford's code works...
JSLint has a new option, Assume Windows. It predefines the following global variables: /*global ActiveXObject: false, CScript: false, Debug: false, Enumerator:...
Just came across some code which was overriding some functionality from the jquery datepicker. The code uses this construct: var a = b = c; which happens to...
I'd just like to report what appears to be a minor typo in the documentation. In http://www.jslint.com/fulljslint.js on line 121 it describes the section on...
Hi When using the JSLint to check jscripts, why do I get an error messages for known and defined JScripts objects like 'ActiveXObject', 'Enumerator39; and for...
Many languages allow a convenience in scripting that allows an && to be used as flow control. var foo = [1,2,3,4]; foo[0] && fop = foo.shift(); //assigns the...
Many browsers barf when an object key is a reserved word. Sure, they should be able to figure out that we are in an object.... But IE can't.Example: var foop...
Hi, checking this HTML fails because of the + in type: <link rel="alternate" type="application/rss+xml" title="" href="" /> (same with atom+xml) Without, the...
Hi everybody, I was wondering how to define my root namespace in "strict format" Normally i use the following code: /*global YAHOO, MYNS */ if (!this.MYNS) { ...
Here is a lisp procedure that simply adds 'a' to the absolute value of 'b': (define (a-plus-abs-b a b) ((if (> b 0) + -) a b)) I think this is beautiful, and I...
The code snippet below doesn't give any errors or warnings. But return with and without a value is used. Shouldn't that at least issue a warning? "use strict";...
I wish JSLint had an option that would allow code like this: if (!someVariable) return; I understand the danger of allowing code without braces like: if...
Not a JSLint question, but I know there are really knowledgeable JavaScript developers on this list ... Why can't I add methods to the prototype of the...
When I don't actually need the object instance, I enclose my "new Xxxx()" statements in parenthesis to keep JSLint happy and I assumed some JavaScript...
I have already defined YAHOO and YUI as accepted global variables but JSLint still warns me that "type is unnecessary" in <script> tags. I've seen the messages...
jslint doesn't expect to see new String, but I need it because I want to set a property of the string: var str = new String('somestring39;); str.id = 123; Or is...
Hi, In the code snippet below, b will always be 'is TRUE'. Clearly the intention was that b should be 'a is FALSE'. No javascript error but the result is...
I frequently find that I must convert non-objects into objects. Consider, for example, a function that expects one of it's arguments to be an object. If you...
I am trying to run JSLint from the command line but it stops after displaying the first warning, even if I turn it of by specifying /*jslint passfail: false */...
I am checking if a variable is defined or not, if it is not defined explicitly I am going to define it by doing: if ( typeof(aVariable) == 'undefined39; ) { var...