Fixes code formatting following JSHint guidelines.

* Adds `npm run check` command for running JSHint.
Adds code formatting checks on prepublish step.