Add .jshintrc and fix warnings

Copied from Translate

Change-Id: I3999eb2f87d006c469b745c4c6dc58ab4eb35eba