Sitelet https://github.com/lightspeedwp/.github/issues/3777
Skip to content

Standardise Prettier formatting across tracked JS/TS files (626-file drift) #3777

Description

@eleshar

Context

#3774 (PR #3775) overhauled the lint/format toolchain and added a format:check script:

npm run format:check   # prettier --check '**/*.{js,jsx,ts,tsx}'

Running it against develop reports 626 tracked files that do not match the repository's Prettier config.

Why this is a separate issue

The drift is entirely pre-existing — it is not caused by #3774. Reformatting 626 files inside that PR would bury a tooling change in enormous unrelated churn, so it was deliberately scoped out. For the same reason, PR #3775 does not wire format:check into required CI: a gate that can never pass is worse than no gate.

Work required

  1. Run npm run format:js (or prettier --write) across the tracked JS/TS files, ideally in reviewed batches by directory rather than one unreviewable commit.
  2. Confirm the repository test suite still passes after each batch.
  3. Once format:check is clean, wire it back as a CI job (it was removed from .github/workflows/lint.yml in chore: improve code-quality tooling, OpenCode diagnostics, and lint performance (#3774) #3775) so the standard is enforced going forward.
  4. Consider extending the same treatment to .cjs files, which lint-staged's *.{js,jsx,ts,tsx} pattern does not cover — several config files (for example eslint.config.cjs) are non-conformant for that reason.

Notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions