Check format of .js files in pre-commit hook.

Will check all but JavaScript files in the "libs" folder.