Releases: prog-time/git-hooks
3.0.0 | Added scripts for HTML, YML, CSS, Markdown
What's Changed
- Issues 7 | Fixed readme.md by @prog-time in #9
- Added scripts for HTML, YML, CSS, Markdown by @prog-time in #14
- fixed README.md by @prog-time in #15
Full Changelog: 2.0.0...3.0.0
2.0.0 | Added scripts for Python and JavaScript
This release adds two new language modules — JavaScript/TypeScript and Python — expanding the collection of reusable git hook scripts beyond the original PHP/Laravel core.
What's New
JavaScript / TypeScript Hooks
Ten new scripts in javascript/ for projects built on Node.js, TypeScript, and frameworks like Next.js.
Linting & Formatting
| Script | Description |
|---|---|
check_eslint_all.sh |
Runs ESLint with --fix across the entire project (app/, components/, lib/, types/) |
check_prettier.sh |
Runs Prettier on staged .ts files passed as arguments |
check_prettier_all.sh |
Runs Prettier on all TypeScript files using glob patterns |
check_tsc_all.sh |
Runs TypeScript type checking via tsconfig.check.json |
Python Hooks
Seven new scripts in python/ covering code style, static analysis, and testing — with both local and Docker execution modes.
Code Style
| Script | Description |
|---|---|
check_flake8.sh |
Runs Flake8 locally on Python files (line length 120) |
check_flake8_in_docker.sh |
Runs Flake8 inside the app_dev Docker container |
Static Analysis
| Script | Description |
|---|---|
check_mypy.sh |
Runs Mypy locally on changed app/*.py files |
check_mypy_in_docker.sh |
Runs Mypy inside the Docker container, mapping host paths to container paths |
Test Coverage
Both modules include full test suites following the project's existing test framework (tests/lib/test_helper.bash).
JavaScript — 3 suites, 10 test cases:
tests/javascript/tests_exist/— 5 cases (no files, non-ts ignored, test exists, test missing, skip patterns)tests/javascript/eslint_all/— 2 cases (pass, fail)tests/javascript/vitest/— 3 cases (full suite, related files, failure)
Python — 7 suites, 26 test cases:
tests/python/flake8/— 5 casestests/python/flake8_docker/— 3 casestests/python/mypy/— 4 casestests/python/mypy_docker/— 3 casestests/python/pytest_local/— 2 casestests/python/pytest_docker/— 3 casestests/python/find_test/— 6 cases
New test helpers added to tests/lib/test_helper.bash:
mock_npx(exit_code, output)— mocksnpxfor JavaScript hook testingrun_hook_at_depth(hook_path, depth, args...)— runs a hook script from a nested directory so that relativePROJECT_ROOTresolution works inside the test environment
CI/CD
GitHub Actions workflow (.github/workflows/tests.yml) now includes a javascript-tests job running in parallel with php-tests and python-tests, all gated by the shellcheck job.
1.0.0 | First build of scripts
This is the first collection of scripts that I use in my work.
What's Changed
- Issues 1 by @prog-time in #4