Skip to content

Automate PHPCS/PHPCBF run after commit with Husky #175

@kirtangajjar

Description

@kirtangajjar

Feature Description

We're expecting developers to run phpcs/phpcbf manually before creating a PR. This can be automated easily via husky. Husky is also used by Gutenberg to lint before commit.

So here are things that we need to do:

  1. Add a pre-commit hook via husky to run phpcbf before commit to auto-fix phpcs errors.
  2. Run phpcs so that users can manually resolve any errors which are not automatically fixable.

Metadata

Metadata

Assignees

Labels

InfrastructureIssues for the overall performance plugin infrastructure[Type] EnhancementA suggestion for improvement of an existing feature

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions