pre-commit: Add eslint hook for javascript files
Also add a new rule to enforce consistent spacing inside braces.