ce914f91fd
Reviewed-on: #1 Co-authored-by: Joseph Nelson <joseph.nelson4456@gmail.com> Co-committed-by: Joseph Nelson <joseph.nelson4456@gmail.com>
21 lines
622 B
Bash
Executable File
21 lines
622 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Check if the lint fix command fails
|
|
# If it does, exit with a non-zero status to prevent the commit.
|
|
|
|
echo "Running lint fix..."
|
|
# Replace with your actual lint fix command
|
|
# This is just an example, adapt it to your linter and project
|
|
npm run lint:fix # e.g., "eslint . --fix"
|
|
|
|
# Example: Capture the exit code of the command
|
|
lint_fix_result=$?
|
|
|
|
if [ $lint_fix_result -ne 0 ]; then
|
|
echo "Linting failed. Commit aborted."
|
|
exit 1 # Exit with a non-zero status to prevent the commit
|
|
fi
|
|
|
|
echo "Lint fix completed successfully. Commit allowed."
|
|
exit 0 # Exit with a zero status to allow the commit
|