It seems that using a variable named "constructor" that is not declared (which in itself is wrong off course) always produces a strange error. The rhino...
It would be cool if it were possible to surpress warnings/errors that originate form a certain line. For example, occasionaly I conciously use an unfiltered...
Try this: var o = {test: 4}; /*jslint forin: false*/ for (k in o) { alert(k); } /*jslint forin: true*/ ... -- We know the hard things are possible, we just...
... Linted on itself: Error: Problem at line 180 character 1: Expected an assignment or function call and instead saw an expression. "use strict"; Problem at...
I find the requirement for using braces excessively anal in such if compounds as: if (/*expression*/) {/*single statement*/} else {/*single statement*/} Is...
True that! Most C-like languages allow the brace-less consequent, but it's evil! Evil, I say! Seriously, it's difficult to read and error-prone. M. ...
... Another option is to just add the feature to your own copy of fulljslint.js. I did this for just this scenario. Add a 'braces' option, then add a boolean...
James Clark
sbj@...
Mar 6, 2009 7:00 pm
394
... it's evil! Evil, I say! ... it's evil! Evil, I say! ... Seriously, having lived on the planet for seven decades and programmed for nearly five of them, I...
Are there any (Windows platform) javascript-aware editors (syntax highlighting) out there that auto-format for jslint (such as proper indenting, automatic...
One possible pitfall is if by any chance you pass something that is not an integer to the Array constructor new Array(3) is like [undefined, undefined,...
... The eval exclusion was for the benefit of JSONT and json2. They represent uses of eval that are beneficial. I have no excuse for the line breaking option....
A robust coding style demands that symbols should be declared before they are used. But how is this possible in the case of mutually recursive functions? If...
With the difference that in the first way the function b is declared in the scope of function a Whereas in the second way function a and b are in the same...
The way I read this, in the first example the function ‘b’ is recreated (which would take time) every time ‘a’ is called. Strictly speaking you would...
I agree with you Jakob For myself I may have declared the function with an empty function var a = function() {}; So that : - a validator which would check then...
Thank's, I didn't realize that it was possible to set jslint options for a part of the file. However, there are still warnings I'd like to suprpress sometimes...
If I have such kind of code try { something } catch (e) {} Means I don't care about e, I will not use it. Unfortunately I have to write catch(e) because catch...
I have seen a lot of confusion around use of immediate invocation of functions. I think JSLint can help if we can insist on some specific styling. I am...
... I agree about the first "bad" example, but I see a lot more people using the second form rather than the third, and I personally also find it much clearer....
... Should it be a tolerate option or a disallow option, and what should the option be called? ... Suggest "Disallow bad (immediate) invocation". Preference...