... /*jslint*/ directives are treated as statements because they respect block scope. Because they respect block scope, your second directive is useless and...
... Ah! Thanks. Following through the rest of that thread, the solution is simple [for my case anyway]. Just change the function definitions from function...
Actually if you work with even listeners it is quite easy to understand why `this` isn't accepted in all cases: ### In the following case `this` is accepted...
... I believe this is a similar problem: with these options: /*jslint es5: true, indent: 2 */ JSLint objects: "Bad for in variable 'a'." on this code: var a, b...
I'm generally a fan of the whitespace rules that JSLint enforces, but there's on exception I'd like to see implemented. When I build an HTML string in...
Would like to voice strong support for paulcrowder197939;s suggestion. I feel that JSLint should be quite liberal when evaluating indentation of any literal...
DC - Thanks for your ongoing efforts maintaining jslint. There's a conflict between the options specified in the call to JSLINT(), and the options specified in...
... [ .. snip .. snip .. ] ... JSLint supports 'scoped39; control comments. I *assume* you either do not have a /*jslint ... */ comment in your code, or it at...
I wasn't aware of the block-level option, so thanks for pointing that out. I'll just move the code that builds the HTML into its own function and specify the...
You can also place the spaces doing the indentation within the string: ....'....<whatever>' + instead of: ........'<whatever>' + So much concatenating IS...
I've avoided putting the spacing in the string itself since it wouldn't get minified out. As for the concatenation cost, remember that I use YUI Compressor to...
Hello, JavaScript 1.8.5 introduces a new method of the Object constructor called Object.keys, which produces an array of the enumerable properties of a given...
... No. Object(o) was not created for that purpose. That code is depending on an edge case. Avoid the edges. Use this instead: typeof o === 'object39; && !o ...
var o = {}; ... typeof o === 'object39; && !o ... Doesn't seem like a very good object detection test? What should it have said? /Jakob _____ From: Douglas...
I think he meant to type this for object detection. typeof o === 'object39; && !!o Ben ... said? ... called Object.keys, which produces an array of the...
Actually what you are describing is not minification. It is obfuscation, which is different. YUI can do both. You are also confusing minification in markup...
First, thank you for your great validation tool. Demo-JavaScript: var test = function () { var letsHaveSomeFun = {}; for (var entry in letsHaveSomeFun) { ...
... No. Declare all vars at the top of the function to avoid hoisting confusions. This is particularly import with the for statement because of the capture of...
[I realize I'm late to the discussion, and I apologize if I'm reopening old wounds.] Referring to the change on June 9 that inverted the semantics of many of...
Scott, What we do at my company is pull down versions of the jslint code and site and then host it internally on test web servers (e.g....
2592
Rob Richardson
erobrich@...
Sep 6, 2011 3:45 am
Kent, We do this too, but don't run it inside Selenium inside a browser. Rather we run JSLint inside cscript.exe or V8 or rhino or JScript. It makes tests ...
Silicon Valley Codecamp is a free software development conference held at Foothill College in Los Altos, California. I will be presenting there again this...
I keep a local copy of jslint too (as part of jslint_on_rails) but that doesn't solve the problem here. The issue is that one change to jslint has caused all...
Sorry for misinterpreting your post. I see the issue. Is it possible to simply pre-process the legacy JavaScript before plugging it through JSLint as was...
Hello I was wondering if it is possible to escape/disable jslint validation for a specific function inside a file like: function off() { /*jslint off*/ ... } ...
Well, let's say you are using some third-party plugin to implement your javascript code interaction with the website. For easier understanding left pick a...