JSLint wants CSS blocks to end in semicolons, like this: <style type="text/css"> #eid{color:navy} </style> It's perfectly OK to not have a semicolon in...
2770
douglascrockford
douglascrock...
Feb 1, 2012 7:29 pm
... I recommend that you follow JSLint's advice....
2771
Doc Emmett Splendid
emmett.thesane
Feb 1, 2012 9:46 pm
This is a difference between maintainable CSS (which should follow a very strict format) and ~minified~ CSS. Just as JSLint won't pass minified JS (which would...
2772
Sean Kelly
seank_com
Feb 1, 2012 10:12 pm
Personally, I prefer to fix my code to follow JSLint's recommendations. That said, I also put all my Javascript in .js files and include them using script tags...
2773
Rob Richardson
erobrich@...
Feb 2, 2012 12:15 am
It is less effective to lint minified or processed code as anything you discover usually can't be repaired in its current format. Also note that JSLint's CSS...
2774
mariuszn3
Feb 2, 2012 1:35 pm
Hi, I approached a whitespace issue. I have a code that it's impossible to refactor so it's ok for jslint - I can resign from checking whitespace but I don't...
2775
douglascrockford
douglascrock...
Feb 2, 2012 1:43 pm
... You may be going overboard on the function chaining thing. When you break a line after '(', JSLint expects to see an open configuration. So var...
2776
douglascrockford
douglascrock...
Feb 2, 2012 4:04 pm
Or you can break compactly before ')'. var someFunction = function () { 'use strict'; }; someFunction()(someFunction)(someFunction)(someFunction ...
2777
mariuszn3
Feb 3, 2012 7:52 am
Thanks, somehow I didn't think about writing it that way, it indeed makes sense....
2778
Jakob Kruse
thekrucible
Feb 3, 2012 11:01 am
Hi If I run the following code (properly indented) through JSLint at jslint.com with all options cleared, it validates. If I run the exact same code through...
2779
Merlin
harry152566
Feb 3, 2012 11:50 am
... I've tried linting the file t.js on both the full and minimized versions of jslint in Widget Tester. I'm not seeing the fault in either version. Using file...
2780
Jakob Kruse
thekrucible
Feb 3, 2012 1:04 pm
Ah yes. Thanks Harry. Obviously the error is partly mine. The “Bad HTML string” error seems to be caused by an internal JSLint error on an earlier run. If...
2781
Merlin
harry152566
Feb 3, 2012 2:10 pm
... Using Widget Tester: Welcome to Yahoo! Widgets 4.5.2x10A50 on 02/03/12 13:52:08.937 getJSLint:Using today's JSLint file. MD5 sum:...
2782
Jakob Kruse
thekrucible
Feb 3, 2012 2:20 pm
... In case of internal errors, yes. ... Actually, they fail in exactly the same way, but the error message given for this error by different JavaScript...
2783
Merlin
harry152566
Feb 3, 2012 2:36 pm
... Confirmed: In Chrome: Error: Problem at line 7 character 22: Cannot read property 'at' of null Over to Douglas! Harry....
2784
douglascrockford
douglascrock...
Feb 3, 2012 6:03 pm
... Thanks. Please try it now. And by the way, in case anyone has been reading this thread, function quote(s) { return '"39; + s + '"39;; } is a dangerously...
2785
Jakob Kruse
thekrucible
Feb 3, 2012 8:48 pm
Works, thanks! And yes, don’t ever use that function or anything like it. It was a bad example. /Jakob Fra: jslint_com@yahoogroups.com...
2786
douglascrockford
douglascrock...
Feb 11, 2012 12:25 am
Or you can wrap the whole thing in parens: var someFunction = function () { 'use strict'; }; (someFunction() (someFunction) (someFunction) (someFunction) ...
2787
spence.randall@...
spence.randa...
Feb 14, 2012 7:03 pm
Given the following code: var obj = {}, ````test = function () { ````````'use strict'; ````````return true; ````}.bind(obj); JSLint returns the following...
2788
John Hawkinson
john.hawkinson
Feb 14, 2012 7:12 pm
JSLint wants you wrap your function expression in parentheses. I think it's probably right, multiword expressions are confusing to read, and parens remove the...
2789
douglascrockford
douglascrock...
Feb 14, 2012 7:27 pm
... Thanks. Please try it now....
2790
spence.randall@...
spence.randa...
Feb 14, 2012 8:11 pm
Works as expected, thanks for the fast turnaround. -Randall...
2791
junkernaught
Feb 17, 2012 10:11 pm
This code gives me an error, I'm not sure why: function charAt(sValue, index) { return sValue.charAt(index) - '0'; } Message: Problem at line 2 character 25:...
2792
douglascrockford
douglascrock...
Feb 17, 2012 10:29 pm
... That warning wasn't very helpful. Please try it now....
2793
junkernaught
Feb 17, 2012 11:08 pm
OK, the new warning makes more sense. Thank you!...
2794
Jordan Harband
ljharb
Feb 18, 2012 2:48 am
The error does still occur if you do choose to wrap your function in parens. ... [Non-text portions of this message have been removed]...
2795
douglascrockford
douglascrock...
Feb 18, 2012 1:46 pm
... That is because you shouldn't do that....
2796
Jordan Harband
ljharb
Feb 19, 2012 9:02 pm
Why do you recommend wrapping an immediate function invocation in parens, but not an immediate invocation of a function call on a prototype method of an...
2797
Phil
druid_rpg
Feb 21, 2012 5:55 am
Tolerate uncapitalized constructors checkbox and the associated newcap flag does not seem to be working. I get ... "should start with an uppercase letter."...
2798
Doc Emmett Splendid
emmett.thesane
Feb 21, 2012 6:06 am
Could you please give us the code sample which fails? The following works for me when the "Tolerate uncapitalized constructors" checkbox is checked: var foo =...