Engineering

⌘K
  1. Home
  2. Docs
  3. Engineering
  4. Git Best Practices
  5. Use Linter in Git Pre-Commit Hook

Use Linter in Git Pre-Commit Hook

It’s good best practice to use linter regularly, especially as git pre-commit hook, using husky.

Reference:

PHP Projects

Reference: https://sebastiandedeyne.com/running-php-cs-fixer-on-every-commit-with-husky-and-lint-staged/

composer require --dev friendsofphp/php-cs-fixer
yarn add --dev husky lint-staged

How can we help?

Leave a Reply

Your email address will not be published. Required fields are marked *