jshint compliance and enforcement

it's not perfect. there are some issues around imports and global
variables that are mentioned in comments in .jshintrc

so those should be fixed