#!/bin/bash

echo "Running lint..."
lint_output=$(npm run format)
lint_exit_code=$?
echo "$lint_output"


# echo "Running tests..."
# test_output=$(npm run test)
# test_exit_code=$?
# echo "$test_output"



if [ $lint_exit_code -ne 0 ]; then
    echo "Linting failed. Commit aborted."
    exit 1
fi

# if [ $test_exit_code -ne 0 ]; then
#     echo "Test failed. Commit aborted."
#     exit 1
# fi

exit 0