mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-01-16 23:00:51 +00:00
23 lines
No EOL
506 B
Bash
23 lines
No EOL
506 B
Bash
#!/bin/sh
|
|
|
|
# Run these command in your terminal from the root of this project.
|
|
|
|
# ```
|
|
# root="$(pwd)"
|
|
# ln -s "$root/git-hooks" "$root/.git/hooks"
|
|
# ```
|
|
|
|
function jslint {
|
|
printf "\nValidating and Linting Javascript. This will take few minutes...\n"
|
|
|
|
npm run lint
|
|
if [[ "$?" != 0 ]]; then
|
|
printf "There are lint errors for your commit. Please run 'npm run fix-lint` to fix them.\n"
|
|
exit 1
|
|
fi
|
|
popd
|
|
|
|
printf "\nJavascript Validating and Linting Completed!\n"
|
|
}
|
|
|
|
jslint |