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...
1259
Harry Whitfield
harry152566
Apr 6, 2010 8:46 am
The Widget Tester Widget (version 8.9) with JSLint Edition 2010-04-05 is now at http://tinyurl.com/5unocx . This version has the new "Tolerate ES5 syntax"...
1260
Douglas Crockford
douglascrock...
Apr 6, 2010 4:19 pm
... option.es5 will now relax the reserved word restriction on object literals and dot notation, and tolerate a dangling comma, so var object = { class:...
1261
boyopeg
Apr 6, 2010 4:47 pm
It seems to me that the trailing comma in object notation is a rather bad coding practice. I'm fine with JS parsers being able to ignore errors such as these....
1262
Michael Mikowski
z_mikowski
Apr 6, 2010 6:55 pm
There is a very good reason to allow for trailing commas (even though IE js doesn't) -- Consider this 'object39; (since we only use it as an associative array...
1263
Michael Mikowski
z_mikowski
Apr 6, 2010 6:56 pm
Whoops. Need more coffee. Should be var hash_example = {...}, not []. But you get the idea. ________________________________ From: Michael Mikowski...
1264
Rob Richardson
erobrich
Apr 6, 2010 7:17 pm
I can see in certain circumstances that trailing commas could be deemed acceptable, though I'm still of the mindset that this is bad form in most JavaScript...
1265
Douglas Crockford
douglascrock...
Apr 6, 2010 7:35 pm
... ES3 does not allow the trailing comma, so IE is correct when it rejects it. ES5 allows but does not require the trailing comma. There is often confusion...
1266
Michael Lorton
mlorton
Apr 6, 2010 7:48 pm
... it. Distinguo: ES3 does not allow the trailing comma, so Internet Explorer is correct TO reject it. IE does the right thing the wrong way. It rejects the...
1267
Douglas Crockford
douglascrock...
Apr 6, 2010 8:12 pm
... You are way out of line. Tone it down....
1268
Simon Kenyon Shepard
sks0001010
Apr 7, 2010 12:27 pm
So, would I be correct in surmising that this change from ES3 to ES5 to allow the trailing comma is for developer convenience as in the aforementioned...
1269
Michael Lorton
mlorton
Apr 7, 2010 2:32 pm
It makes reordering easier, editing the list less error-prone, and generating Javascript from data a little simpler. Overall, probably a good thing. M. ...
1270
Andrew
effectivit
Apr 12, 2010 1:09 pm
I'm putting together a presentation to highlight the sort of bugs that JSLint can help you avoid, I guess this focuses on obvious bugs in code caused by things...
1271
Michael Lorton
mlorton
Apr 12, 2010 6:14 pm
Wouldn't every error message in the jslint.js file suggest an example? My biggest one is extra final semicolon;. M. ________________________________ From:...
1272
klaus
klaus_komenda
Apr 20, 2010 5:09 pm
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...
1273
TIM FULCHER
tfulcher...
Apr 21, 2010 3:31 pm
Hi I'm running a slightly modified jslint over a bunch of our javascript files and have noticed that if our code defines an array such as var a = new...
1274
Douglas Crockford
douglascrock...
Apr 21, 2010 7:33 pm
... var a = ["one", "two", "three"]; Smaller, faster, better. Just fix your code....
1275
g2223060
Apr 21, 2010 8:45 pm
I have some legacy JavaScript that I am trying to clean up, which of course involves heavy linting [;)] The code was all global, of course, which I have...
1276
Aseem Kishore
aseem.kishor...
Apr 21, 2010 8:51 pm
/*global FormatMask: true */ The ": true" part tells JSLint that that global variable is read-write, not read-only. Aseem ... [Non-text portions of this...
1277
g2223060
Apr 21, 2010 9:44 pm
One of my favorites: {dangling: 'commas39;, 'in': 'object literals', }...
1278
Felix E. Klee
feklee
Apr 25, 2010 3:32 pm
Is that possible? IMHO, curly braces all over the place, even where they are not needed, make readability worse. But that's my opinion, and I don't want to ...
1279
Douglas Crockford
douglascrock...
Apr 25, 2010 9:29 pm
... JSLint can do a much better job for you if you use braces consistently, so you should use braces consistently. It is good that you do not want to argue....
1280
Mike West
mikewest_y
Apr 26, 2010 1:02 pm
JSLint doesn't like vendor extensions in pseudo-selectors, even with the `css` options toggled. I'm thinking specifically of `button:-moz-focus-inner`, which...
1281
Cheney, Edward A SSG ...
sandyhead25
Apr 26, 2010 8:08 pm
I disagree. Vendor specific CSS extensions are generally bad practice with regards to conformance and efficient of CSS payload size. The Mozilla specific...
1282
aceblchboy
Apr 26, 2010 8:32 pm
Hi Douglas, I've got an idea here. I don't know if you've already considered it, but you seem to have implemented this idea to some degree with locating...
1283
Mike West
mikewest_y
Apr 26, 2010 9:53 pm
On Mon, Apr 26, 2010 at 10:08 PM, Cheney, Edward A SSG RES USAR USARC ... 1. How do you feel about `img { -ms-interpolation-mode: bicubic; }`? How about...
1284
Cheney, Edward A SSG ...
sandyhead25
Apr 27, 2010 8:55 am
There are several different rendering engines available on the web. They each process presentation differently even when in full conformance to the...
1285
Mike West
mikewest_y
Apr 27, 2010 10:02 am
On Tue, Apr 27, 2010 at 10:55 AM, Cheney, Edward A SSG RES USAR USARC ... Quite true. This, however, is an argument against expending too much effort in...
1286
Rob Richardson
erobrich
Apr 27, 2010 3:42 pm
I see value in a lint tool for CSS that could be triggered to accept / reject vendor-specific rendering rules, and a second trigger to accept / reject the...
1287
Mike West
mikewest_y
Apr 27, 2010 4:19 pm
... I understand that, and also see value in concentrating effort on the areas in which JSLint most clearly shows value. I wasn't expecting to get into an...