Add JSHint support.

Use npm run check or npm run lint.
Fix a few JSHint warnings.