I am attempting to write a automatic semicolon insertion mechanism into my custom fork of Frank Marcia's JavaScript port jsmin when I encountered some strange...
2693
Rob Richardson
erobrich@...
Dec 5, 2011 9:31 pm
Try this: var p = 2, o = { p: "a" }; o.f = (function (m) { return { l: m.p }; }(o)); p = o.f.l; Or this: var p = 2, o = { p: "a" }; o.prototype.f =...
2694
douglascrockford
douglascrock...
Dec 5, 2011 9:32 pm
Is the Complexity metric in the Function Report benefiting anyone?...
2695
Merlin
harry152566
Dec 5, 2011 10:02 pm
I doubt it. It does not seem to match up with my feelings about a function....
2696
Tom Worster
thefsb
Dec 6, 2011 1:16 pm
... This is the first I've heard of it so it's not been benefiting me....
2697
Simon Kenyon Shepard
sks0001010
Dec 6, 2011 4:05 pm
i've been using to identify methods for re-factor on a large legacy codebase. ... -- "We are the music makers, And we are the dreamers of dreams" [Non-text...
2698
douglascrockford
douglascrock...
Dec 9, 2011 6:11 pm
JSLint now checks that the names of options in the /*jslint*/ directive are now spelled correctly. It used to ignore misspelled or unknown options....
2699
Satyam
satyamutsa
Dec 19, 2011 4:29 pm
An unused argument in an argument list should not be reported as an 'unused variable' if there are more arguments in the argument list. It is not unused, it...
2700
Martin Cooper
mfncooper
Dec 19, 2011 4:50 pm
CouchDB uses an attribute named _rev to identify document revisions. var revision = doc["_rev"]; gets me: ['_rev39;] is better written in dot notation. var...
2701
Michael S. Mikowski
z_mikowski
Dec 19, 2011 4:59 pm
i go with nomen....
2702
douglascrockford
douglascrock...
Dec 19, 2011 5:18 pm
... This is sometimes an indication of a coding error or a design error. If you are doing this intentionally, which is probably a bad idea, then use the...
2703
Satyam
satyamutsa
Dec 19, 2011 5:47 pm
... It often happens when writing functions that register as callbacks. Libraries try to provide enough information for whatever the listener might need. They...
2704
Jérôme DESPATIS
jdespatis
Dec 20, 2011 4:30 pm
Well all is in the title :) Thanks for your help -- Jérôme Despatis jerome@......
2705
Jérôme DESPATIS
jdespatis
Dec 20, 2011 6:19 pm
Well I answer to myself: The answer is no, here is some css minified by JSMin: .djfc-YT{background-position:-44px-170px;width:17px;height:12px;} there should...
2706
sandyhead25
Dec 21, 2011 7:36 pm
Jerome, Native JSMin does not support CSS. My custom fork of JSMin fully supports CSS and provides semicolon insertion for JavaScript minification. You can...
2707
Kirk Cerny
kirk.cerny
Dec 21, 2011 10:08 pm
I like this error. It reminds me every time that I have a method that needs to be reviewed. [Non-text portions of this message have been removed]...
2708
Rob Richardson
erobrich@...
Dec 22, 2011 6:55 pm
Wrap each call: /*jslint unparam:true */ myResult = myFunc(a,b,c); /*jslint unparam:false */ After about your third of these, "tolerate unused" or ignoring the...
2709
douglascrockford
douglascrock...
Dec 22, 2011 6:56 pm
I removed the Complexity score from the function report. I didn't find it to be meaningful....
2710
mruhrbach
Dec 23, 2011 4:52 pm
Gentlemen, after setting JSLint loose on my code I find myself with some bugs corrected. However, as my project is set up in many separate script files, I have...
2711
Toby Maxwell-Lyte
toby_maxwell...
Dec 24, 2011 2:31 pm
For JSLinting whole projects take a look at the JSLint-4-Java ant task. http://docs.jslint4java.googlecode.com/git/2.0.1/ant.html Regards, Toby ... -- Toby...
2712
Eriks Nukis
eriks.nukis@...
Dec 24, 2011 6:04 pm
Hi, Or JSLint plugin for Sonar: http://docs.codehaus.org/display/SONAR/JavaScript+Plugin Regards, Eriks On Saturday, December 24, 2011, Toby Maxwell-Lyte < ......
2713
Mark Ruhrbach
mruhrbach
Dec 25, 2011 6:29 pm
Hi Toby, thanks for the link. I have tested it in my project. It appears the Ant task shows the same behaviour as the Maven plugin: both require /*global ...*/...
2714
mruhrbach
Dec 25, 2011 7:05 pm
Oops, the attachment got lost. See instead: https://github.com/mruhrbach/jslint-test-fixture ... Ant task shows the same behaviour as the Maven plugin: both...
2715
Frederik Dohr
ace_noone
Dec 26, 2011 10:12 am
... I very much disagree. Relying heavily on globals like that is a pretty clear sign that something's awry. You might want to use namespaces, i.e. moving...
2716
mruhrbach
Dec 26, 2011 9:08 pm
Hi F., I agree that globals should be minimized. Just here is where the beast starts to chase its own tail. In any file I might go like: File A: MY_APP = { ......
2717
Frederik Dohr
ace_noone
Dec 27, 2011 8:28 am
... IMO, explicitly declaring dependencies is a _good_ thing - so I don't see a problem with this. -- F....
2718
Toby Maxwell-Lyte
toby_maxwell...
Jan 1, 2012 10:38 am
We use a global namespace and use it in the following way var myNameSpace = myNameSpace || {}; myNameSpace.myFunct = function () {...}; ... -- Toby...
2719
Brennan
gurunannerb
Jan 5, 2012 2:07 pm
I am posting here with some trepidation, and I am thoroughly expecting to be insulted by DC. Here goes anyway. "The Good Parts" Appendix A5 (Awful parts)...
2720
douglascrockford
douglascrock...
Jan 5, 2012 2:26 pm
... There is confusion beyond the ASCII set. There are codes with identical or similar glyphs. A correct program can be indistinguishable from an incorrect...
2721
Tom Worster
thefsb
Jan 5, 2012 2:54 pm
I like to program in Unicode (☠= ☃ + π;) but I accept that there can be difficulties. One question is what collation JS should use to decide equivalence...