Skip to content

Prevent style drift: pre-commit hooks + staged-file formatting/lint #9

@foo-bender

Description

@foo-bender

Problem

Style regressions are reaching PR stage instead of being caught before commit.

Proposal

Introduce local guardrails:

  • Pre-commit hooks (e.g. Husky + lint-staged)
  • Run fast checks on staged files only
  • Auto-fix where safe (prettier, phpcbf) before commit

Keep CI as strict backstop while local checks stay fast.

Acceptance criteria

  • Pre-commit hook setup added.
  • Staged-file lint/format commands added.
  • Contributor docs updated with hook install/usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    parkedThis issue is parked. I need time to think more on it

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions