I use this pattern: https://github.com/coolaj86/require-kiss-js I'm also going to look into RequireJS in the near future. AJ ONeal ... [Non-text portions of...
2091
AJ ONeal
coolaj86
Mar 31, 2011 3:46 pm
That is a nightmare! I just noticed that a few days ago and it was really upsetting to see even MORE global leakage... YUCK. AJ ONeal ... [Non-text portions of...
2090
Alexandre Morgaut
morgaut_a
Mar 31, 2011 12:08 pm
My biggest nightmare today is that recent browsers like Chrome, IE9, FF4 generate a global variable from the id of each HTMLElement of the document... It is...
2089
Douglas Crockford
douglascrock...
Mar 31, 2011 11:41 am
... The node.js documentation is still a bit sketchy, so it is hard to find all of the globals. Please let me know if you find more....
2088
Douglas Crockford
douglascrock...
Mar 31, 2011 11:40 am
... JSLint allows tabs. It even allows the mixing of tabs and spaces, which is a bad practice. Where it draws the line is when it sees a space immediately...
2087
abyssoft@...
abyssoft...
Mar 30, 2011 9:00 pm
Works Correctly // I'm a Block Comment that has a tab Has Defect /* I'm a stream comment that has a tab */...
2086
jeddahbill
Mar 30, 2011 4:25 pm
What has worked well for me is to create a namespace based on one's domain name, or a domain name that one owns. This is discussed in some detail by David...
2085
AJ ONeal
coolaj86
Mar 30, 2011 2:51 pm
The `node` option should also include `setInterval` and `setTimeout`, as they are built-in in node. AJ ONeal ... [Non-text portions of this message have been...
2084
Cheney, Edward A SSG ...
sandyhead25
Mar 30, 2011 2:35 pm
Classification: UNCLASSIFIED ... var o = { // global object first: function (xyz) { return xyz; }, second: function (abc) { return abc; } }; o.first(); // this...
2083
Erik Eckhardt
vorpalmage
Mar 29, 2011 11:17 pm
If you were creating a specialized code library, what method would you use to "namespace" all the functions in use by that library? Since functions are ...
2082
Rob Richardson
erobrich@...
Mar 29, 2011 9:04 pm
Could this only be enabled if one opts into "use strict"? Rob ... From: jslint_com@yahoogroups.com [mailto:jslint_com@yahoogroups.com] On Behalf Of Douglas...
2081
AJ ONeal
coolaj86
Mar 29, 2011 8:43 pm
And it would also be nice to have - a simple example jslint commandline utility for Node.JS - other examples for other interpreters - some example javascript...
2080
AJ ONeal
coolaj86
Mar 29, 2011 8:42 pm
Doug, I saw that someone tried to push a commit with the CommonJS export and it was rejected. However, since your JSLINT file can't be exported as a module...
2079
Douglas Crockford
douglascrock...
Mar 29, 2011 3:57 pm
... The principle misuse is to access global variables. Global variables should be avoided....
2078
Erik Eckhardt
vorpalmage
Mar 29, 2011 3:20 pm
Is there some place an interested person could read about the good vs. bad uses of `window`? ... [Non-text portions of this message have been removed]...
2077
Douglas Crockford
douglascrock...
Mar 29, 2011 3:13 pm
The Assume a browser option now includes 'window. Most uses of window are in support of bad practices, but some uses of it are now required by ES5/strict. For...
2075
AJ ONeal
coolaj86
Mar 28, 2011 11:14 pm
Many node scripts begin with #!/usr/bin/env node Will you please ignore "#!whatever" if it is the first line? AJ ONeal ... [Non-text portions of this message...
2063
IceBox
santini.alberto
Mar 24, 2011 4:16 pm
... I read the following topic: http://tech.groups.yahoo.com/group/jslint_com/message/543 It seems JSLint is right. :) Regards, Alberto...
2062
IceBox
santini.alberto
Mar 24, 2011 4:13 pm
Hello. I started using express, a framework for node.js. The following line app.use(express.static(__dirname + '/live39;)); gets Expected an identifier and...
2061
douglascrockford
douglascrock...
Mar 22, 2011 8:46 pm
JSLint now has an Assume Node.js option that predefines global variables for Node.js. http://nodejs.org/...
2060
Ezequiel
thehungerforce
Mar 20, 2011 5:23 pm
I remember reading JSLint's source and seeing a is_own function to filter forins. Apparently, it seems Crockford has switched to actually writing...
2059
Ezequiel
thehungerforce
Mar 20, 2011 5:15 pm
I don't want to tolerate unfiltered forins, though....
2053
Lindsay John Lawrence
thinknlive
Mar 10, 2011 11:06 pm
Thanks! I have read that book cover to cover several times and it continues to be an excellent reference... somehow I missed that statement of his though. ... ...
2052
spence.randall@...
spence.randa...
Mar 10, 2011 7:47 pm
Deprecated? No, I don't think so. There are almost always better ways of writing statements that more explicitly define what you are attempting to do without...
2051
Lindsay John Lawrence
thinknlive
Mar 10, 2011 7:34 pm
Thanks! Why the change though? Is 'continue39; being deprecated in the language? --Lindsay ... From: spence.randall@... <randall@...> Subject:...
2050
spence.randall@...
spence.randa...
Mar 10, 2011 7:00 pm
It's not a bug, JSLint has a new(ish) "Tolerate continue" option. You can check that box in options, or add /*jslint continue:true*/ to your code. Or you could...
2049
Lindsay John Lawrence
thinknlive
Mar 10, 2011 6:50 pm
Hello, Problem at line 9 character 7: Unexpected 'continue39;. I now get an error like the above with loops that have a 'continue39; of the form shown...
2048
Satyam
satyamutsa
Mar 10, 2011 6:11 pm
I would like to add that while undefined means "I don't have a clue what the value might be", null means "I know it has no value" (a known unknown :-P )....
2047
abyssoft@...
abyssoft...
Mar 10, 2011 4:53 pm
In response to the last question, ... ********** The Truthiness of null and undefined are not the same. while null == undefined is true, null === undefined is...
2046
Kent Davidson
kentdavidson
Mar 10, 2011 4:32 pm
... True, it's not necessary in this case. ... I err on the side of just making the cosmetic change, even if I know the warning is not really going to affect...