Define JSHint configuration on .jshintrc and validate the code

* Replace console.log by mw.log
* Use stopSpinner() in more places