what to do about jslint?
Wong, Harris
hwong at ocad.ca
Thu Feb 10 19:00:35 UTC 2011
+1 on
2) and 3)
________________________________________
From: fluid-work-bounces at fluidproject.org [fluid-work-bounces at fluidproject.org] On Behalf Of Justin Obara [obara.justin at gmail.com]
Sent: Wednesday, February 09, 2011 5:40 PM
To: Fluid Work
Subject: what to do about jslint?
You may recall from a past dev meeting Michelle mentioning that jslint no longer has any tolerance for var's in for loops.
For instance this would no longer be acceptable.
for (var i = 0; i < 5; i++) {
//do something five times
}
The biggest problem that this poses to us is that, jslint does not allow you to scan past it, and provides no means of ignoring it.
We still need to lint our code though. Here are some options we have.
1) Fork ( https://github.com/douglascrockford/JSLint ). Make the necessary changes and send a pull request.
2) Move the var out of the for loop and place it just above.
var = i;
for (i = 0; i < 5; i++) {
// do something five times
}
3) we could also take up the practice of moving all of the var's to the top of every function
I'm curious to know what everyone's thoughts are on these, or if there are other options that we have as well.
Thanks
Justin
_______________________________________________________
fluid-work mailing list - fluid-work at fluidproject.org
To unsubscribe, change settings or access archives,
see http://fluidproject.org/mailman/listinfo/fluid-work
More information about the fluid-work
mailing list