# Try it out
ddev ssh --dir /var/www/html/vendor-local/apple-news
composer run check-cs
composer run phpstan
ddev exec npx husky-init
ddev exec npm install --save-dev lint-staged
touch .lintstagedrc.json
.lintstagedrc.json
:
{
"*": "prettier --ignore-unknown --write"
}
.husky/pre-commit
:
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
# Add to path for GUIs (Tower, etc.)
PATH="/usr/local/bin:$PATH"
# If using using nvm and running from host…
#[[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh
ddev exec npx lint-staged
If using Tower, try setting your Git binary to usr/local/bin/git
or opt/homebrew/bin/git
: