openstack at sheep.art.pl
Mon Nov 25 09:46:21 UTC 2013
On 22/11/13 16:08, Imre Farkas wrote:
> There's a jslint fork called jshint which is able to run in the browser
> without any node.js dependency.
> I created a POC patch  long time ago to demonstrate its capabilities.
> It's integrated with qunit and runs automatically with the horizon test
> The patch also contains a .jshintrc file for the node.js package but you
> can remove it since it's not used by the qunit+jshint test at all.
This is excellent, just as I wanted to raise the issue of inconsistent
style in js in Horizon. Running jshint as part of the qunit tests is a
great solution that I didn't even think about. I think we should
definitely use that.
language that wasn't fortunate enough to have its syntax designed and
tested for a long time by a crowd of very intelligent and careful
people, like Python's. It's full of traps, things that look very
innocent on the surface and seem to work without any errors, but turn
out to be horribly wrong -- and all because of a missing semicolon or an
extra comma or even a newline in a wrong spot. Jshint catches at least
the most common mistakes like that, and I honestly can't imagine writing
use it sooner or later, and preferably sooner.
Whether we need node.js for it or not is a technical issue -- as Imre
demonstrated here, this one can be solved without node.js, so there is
really nothing stopping us from adopting it.
More information about the OpenStack-dev