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...
2586
Ben White
benxwhite
Aug 25, 2011 3:36 pm
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...
2585
Jakob Kruse
thekrucible
Aug 25, 2011 3:30 pm
var o = {}; ... typeof o === 'object39; && !o ... Doesn't seem like a very good object detection test? What should it have said? /Jakob _____ From: Douglas...
2584
Douglas Crockford
douglascrock...
Aug 25, 2011 3:10 pm
... 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 ...
2583
Chris
altearius
Aug 25, 2011 2:41 pm
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...
2582
paulcrowder1979
Aug 24, 2011 1:29 pm
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...
2581
Satyam
satyamutsa
Aug 24, 2011 6:51 am
You can also place the spaces doing the indentation within the string: ....'....<whatever>' + instead of: ........'<whatever>' + So much concatenating IS...
2579
paulcrowder1979
Aug 23, 2011 9:03 pm
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...
2578
Phil
druid_rpg
Aug 23, 2011 8:32 pm
... [ .. snip .. snip .. ] ... JSLint supports 'scoped39; control comments. I *assume* you either do not have a /*jslint ... */ comment in your code, or it at...
2577
cheesox
Aug 23, 2011 8:30 pm
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...
2576
William Chapman
jeddahbill
Aug 23, 2011 7:32 pm
Would like to voice strong support for paulcrowder197939;s suggestion. I feel that JSLint should be quite liberal when evaluating indentation of any literal...
2575
paulcrowder1979
Aug 23, 2011 7:13 pm
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...
2574
Douglas Crockford
douglascrock...
Aug 22, 2011 10:00 pm
... JSLint expects that the induction variable is local to the function containing the loop....
2573
pierremartineau
Aug 22, 2011 7:01 pm
... 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...
2572
Marcos Zanona
marcos.zanona
Aug 17, 2011 8:49 am
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...
2571
Phil
druid_rpg
Aug 17, 2011 3:16 am
... Ah! Thanks. Following through the rest of that thread, the solution is simple [for my case anyway]. Just change the function definitions from function...
2570
Douglas Crockford
douglascrock...
Aug 16, 2011 4:45 pm
... /*jslint*/ directives are treated as statements because they respect block scope. Because they respect block scope, your second directive is useless and...
2569
Douglas Crockford
douglascrock...
Aug 16, 2011 4:39 pm
... Thanks. Please try it now....
2568
benxwhite
Aug 16, 2011 3:20 pm
var getGroupId = function (group) { /*jslint regexp:true*/ return group.name.replace(/<.+?>|\W/g, '').toLowerCase(); /*jslint regexp:false*/ }; This throws an...
2567
paulcrowder1979
Aug 16, 2011 2:09 pm
This code fails because strict mode prohibits function declarations in conditional blocks like "switch" and "if" statements, but JSLint doesn't catch this....
2566
paulcrowder1979
Aug 16, 2011 1:58 pm
Crockford explains his reasoning in this post <http://tech.groups.yahoo.com/group/jslint_com/message/1553> . Personally I find this rule unacceptable, and...
2565
Phil
druid_rpg
Aug 8, 2011 7:16 pm
... http://javascriptweblog.wordpress.com/2011/05/03/javascript-strict-mode/ ... I have gone through those links (and more), but do not see anything about...
2564
Frederik Dohr
ace_noone
Aug 7, 2011 7:37 am
... There are a plenty of resources on ES5 strict mode, e.g. http://www.yuiblog.com/blog/2010/12/14/strict-mode-is-coming-to-town/ ...
2563
Phil
druid_rpg
Aug 6, 2011 10:55 pm
The last few versions [the last couple of days] of jslint have been complaining about a Strict violation for every reference to this in my scripts. Is there an...
2562
Phil
druid_rpg
Aug 6, 2011 10:37 pm
I am having a problem with the latest version of JSLint. Environment: Windows XP Pro SP4; FF5.0; jslint.com Edition 2011-08-05 I am getting: Problem at line...
2561
Douglas Crockford
douglascrock...
Aug 5, 2011 10:58 pm
... Thanks. Please try it now....
2560
s_lubowsky
Aug 5, 2011 3:36 pm
I just grabbed the latest jslint (8/3/11) and suddenly its complaining that using "this" is a constructor is a strict violation. I searched around a bit but...
2559
R. Mark Volkmann
mark_volkmann
Aug 5, 2011 12:33 pm
One reason I like that style, declaring all local variables on one line and initializing them later, is that it reminds me of Smalltalk. ... R. Mark Volkmann ...
2558
Tom Worster
thefsb
Aug 5, 2011 12:24 pm
... If you take that step, I hope you do so because you believe it is a good policy, not because of a tool like JSLint. Personally, fwiw, I think initializing...
2557
abyssoft@...
abyssoft...
Aug 5, 2011 4:24 am
That looks like jslint is right when you review it. by setting a single variable on the line of the var statement you are setting the expected pattern of 1...