mardi 31 mars 2015

How configure jshint in a meanjs project with socket.io?

I followed exactly that tutorial (I obviously replaced the vexxhost domain name by localhost:3000 for my tests).


And while calling grunt there is an error ('io' is not defined) but the server start without any other complain.


If I correctly understood the problem, jshint scan the whole project to validate the code and he finds on reference to an undefined variable ! But 'io' is defined when the whole application starts (because the script are loaded). In fact, that error is more a warning than an error


If I am right (and I hope some people here will correct me if I am not), that bring us to my question : How refactor the code or configure jshint to avoid that warning ?


If possible I would prefer to have an explicit reference to 'io'.


By advance thank you to everyone.


Aucun commentaire:

Enregistrer un commentaire