Skip to content

Compare: Engineering Guidelines

Showing with 15 additions and 1 deletion.
  1. +15 −1 Engineering-Guidelines.md
16 changes: 15 additions & 1 deletion Engineering-Guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,21 @@ All contributions to this project will be checked against [WordPress-Coding-Stan

To verify your code meets the requirements, you can run `npm run lint`.

You can also install a `pre-commit` hook by running `bash vendor/xwp/wp-dev-lib/scripts/install-pre-commit-hook.sh`. This way, your code will be checked automatically before committing any changes.
You can also install a `pre-commit` hook via:

```sh
echo "set -e; composer run-script pre-commit" > .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
```

Or if running inside Lando:

```sh
echo "set -e; lando composer run-script pre-commit" > .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
```

This way, your code will be checked automatically before committing any changes.

### Tests

Expand Down