I'm building my final .js file thanks to Ant scripting. Currently I'm validating every single pieces independently. Thanks to /*global */ I can ride of the...
... Is execution not an indication of use? I would think if something were properly executed it is used code by the interpreter even if that usage, or any...
... Can you please explain why in more detail? Could not declaring the same variable more than once could also lead to confusion? I think when most people...
... When I execute the program I am presented with a first alert displaying "9" and then a second alert displaying "6". If I remove z from the program the...
As with the others that have commented. I was very excited when this feature was introduced, and find it very useful. I often have multiple js files that are...
I also find removing the support for /*global */ to be a major setback. Combining several JavaScript files into one for deployment is somewhat a must. In most...
... I seem to be missing something here. Why are people okay with writing: /*global $ */ But not: var $; This is very perplexing to me. Why would you choose a...
... It affects compression (albeit only a tiny bit unless you have a lot of global variables, which you shouldn't anyway...) And it goes against DRY. Probably...
While in general I approve of being able to turn off warnings, why do you have "possibly several hundred "var $;" statements"? You would need at most one per...
My first concern with JSLint is correctness. Because I am a deeply flawed human being, and because JavaScript is a deeply flawed programming language, I depend...
200-500 javascript files in an application is common where I work. Most of those files use some JavaScript library, for instance Prototype. All JavaScript...
Very well said. Thanks for explaining that in depth. I think it makes a lot of sense now. Still, it might be nice to have an ES5 strict mode flag in JSLint...
... Looking at an older version of jslint.js (2008-11-07), it has the ... The way I understand it, /*global*/ is normally used to disable warnings about...
Good. Perhaps this will inspire people to merge their various JS files into a single file for output at the CMS layer prior to validation. That would be the...
One thing I can do is to add more Assume options supporting popular Ajax libraries. If you are responsible for a popular Ajax library with a small, stable list...
Or, add some extrinsic way of saying, "These are the globals I'm not declaring but I don't want me to yentz me about." M. ________________________________ ...
... For library authors managing separate files and combing at runtime, what about using the old /*extern */ declaration? That seems like it would be a...
... Right. You don't throw the baby out with the bathwater, even if the baby is dead. So I am keeping /*global */. The variables that it defines will be const....
Arrays work really differently in JavaScript than in most other languages. If you do not understand those differences, you can be in for a world of hurt....
I believe the useful case is where the argument is a integer. My own opinion would be that that case isn't useful enough to justify allowing the construct at...
I am curious why JSLint dislikes this: var foo = new function () { this.bar = 1; }(); Without the "new", "this" is bound to the global object. It is true that...
... The object will always have the new function's prototype in its inheritance chain, which will be linked to the function. Every time you make another foo,...
... Ah, so it has to do with more efficient memory management. I continue to be amazed how powerful the "return {}" construct is. At any rate, thanks for...