@@ -7,6 +7,10 @@ A collection of reusable git hook scripts for automating code quality checks and
77- ** JavaScript/TypeScript** : ESLint, Prettier, TypeScript type checking, Vitest test runner, test existence validation
88- ** Python** : Flake8 linting, Mypy static analysis, Pytest runner, service test validation (local and Docker modes)
99- ** PHP/Laravel** : PHPStan analysis with progressive error reduction, Pint code style fixing, test coverage validation
10+ - ** CSS/SCSS/Less** : Stylelint code style validation
11+ - ** HTML** : HTMLHint linting
12+ - ** Markdown** : markdownlint style validation
13+ - ** YAML** : yamllint style validation
1014- ** Docker** : Dockerfile linting with Hadolint
1115- ** Shell** : Script validation with ShellCheck
1216- ** Git** : Branch naming conventions, automatic task ID injection in commits
@@ -55,6 +59,34 @@ A collection of reusable git hook scripts for automating code quality checks and
5559| ` php/find_test.sh ` | Validates that modified PHP classes have corresponding unit tests. |
5660| ` php/start_test_in_docker.sh ` | Runs PHPUnit tests inside Docker for modified files. |
5761
62+ ### CSS / SCSS / Less
63+
64+ | Script | Description |
65+ | --------| -------------|
66+ | ` css/check_stylelint.sh ` | Runs Stylelint on staged CSS/SCSS/Less files passed as arguments. |
67+ | ` css/check_stylelint_all.sh ` | Runs Stylelint on all CSS/SCSS/Less files in the project. Used in pre-push hooks. |
68+
69+ ### HTML
70+
71+ | Script | Description |
72+ | --------| -------------|
73+ | ` html/check_htmlhint.sh ` | Runs HTMLHint on staged HTML files passed as arguments. |
74+ | ` html/check_htmlhint_all.sh ` | Runs HTMLHint on all HTML files in the project. Used in pre-push hooks. |
75+
76+ ### Markdown
77+
78+ | Script | Description |
79+ | --------| -------------|
80+ | ` markdown/check_markdownlint.sh ` | Runs markdownlint on staged ` .md ` files passed as arguments. |
81+ | ` markdown/check_markdownlint_all.sh ` | Runs markdownlint on all ` .md ` files in the project. Used in pre-push hooks. |
82+
83+ ### YAML
84+
85+ | Script | Description |
86+ | --------| -------------|
87+ | ` yml/check_yamllint.sh ` | Runs yamllint on staged ` .yml ` /` .yaml ` files passed as arguments. |
88+ | ` yml/check_yamllint_all.sh ` | Runs yamllint on all ` .yml ` /` .yaml ` files in the project. Used in pre-push hooks. |
89+
5890### Git Workflow
5991
6092| Script | Description |
@@ -138,6 +170,46 @@ A collection of reusable git hook scripts for automating code quality checks and
138170./php/check_phpstan.sh strict src/Service.php
139171```
140172
173+ ### CSS / SCSS / Less
174+
175+ ``` bash
176+ # Check staged files
177+ ./css/check_stylelint.sh styles/main.css components/button.scss
178+
179+ # Check all files in the project
180+ ./css/check_stylelint_all.sh
181+ ```
182+
183+ ### HTML
184+
185+ ``` bash
186+ # Check staged files
187+ ./html/check_htmlhint.sh templates/index.html templates/layout.html
188+
189+ # Check all files in the project
190+ ./html/check_htmlhint_all.sh
191+ ```
192+
193+ ### Markdown
194+
195+ ``` bash
196+ # Check staged files
197+ ./markdown/check_markdownlint.sh README.md docs/guide.md
198+
199+ # Check all files in the project
200+ ./markdown/check_markdownlint_all.sh
201+ ```
202+
203+ ### YAML
204+
205+ ``` bash
206+ # Check staged files
207+ ./yml/check_yamllint.sh .github/workflows/ci.yml docker-compose.yml
208+
209+ # Check all files in the project
210+ ./yml/check_yamllint_all.sh
211+ ```
212+
141213### Branch Name Validation
142214
143215``` bash
@@ -188,6 +260,18 @@ bash python/find_test.sh $FILES
188260PHP_FILES=$( echo " $FILES " | grep ' \.php$' || true)
189261[[ -n " $PHP_FILES " ]] && bash php/check_phpstan.sh default $PHP_FILES
190262
263+ # CSS/SCSS/Less
264+ bash css/check_stylelint.sh $FILES
265+
266+ # HTML
267+ bash html/check_htmlhint.sh $FILES
268+
269+ # Markdown
270+ bash markdown/check_markdownlint.sh $FILES
271+
272+ # YAML
273+ bash yml/check_yamllint.sh $FILES
274+
191275# Shell
192276SH_FILES=$( echo " $FILES " | grep ' \.sh$' || true)
193277[[ -n " $SH_FILES " ]] && bash scripts/check_shellcheck.sh $SH_FILES
@@ -207,16 +291,28 @@ SH_FILES=$(echo "$FILES" | grep '\.sh$' || true)
207291./tests/python/flake8/run.sh
208292./tests/python/mypy/run.sh
209293./tests/python/find_test/run.sh
294+ ./tests/css/stylelint/run.sh
295+ ./tests/css/stylelint_all/run.sh
296+ ./tests/html/htmlhint/run.sh
297+ ./tests/html/htmlhint_all/run.sh
298+ ./tests/markdown/markdownlint/run.sh
299+ ./tests/markdown/markdownlint_all/run.sh
300+ ./tests/yml/yamllint/run.sh
301+ ./tests/yml/yamllint_all/run.sh
210302```
211303
212304## Requirements
213305
214306- Bash 4.0+
215307- Git
216308- jq
217- - Node.js with npx (for JavaScript/TypeScript hooks)
309+ - Node.js with npx (for JavaScript/TypeScript, CSS, HTML hooks)
218310- Python 3, Flake8, Mypy, Pytest (for Python hooks)
219311- PHP 8.1+ with Composer (for PHP hooks)
312+ - Stylelint (` npm install -g stylelint ` ) or via ` npx `
313+ - HTMLHint (` npm install -g htmlhint ` ) or via ` npx `
314+ - markdownlint-cli (` npm install -g markdownlint-cli ` )
315+ - yamllint (` pip install yamllint ` or system package)
220316- Docker (optional, for Docker-based hooks)
221317- ShellCheck (for shell validation)
222318
0 commit comments