WordPress / WordPress/block-development-examples
Root tooling hygiene: husky v8 patterns, repo-wide phpcs on every commit, license mismatch, stale devDependencies
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 334
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Description
Problem
Root-level developer tooling has accumulated traps and cruft:
- husky v8 patterns:
"prepare": "husky install"and the. "$(dirname -- "$0")/_/husky.sh"sourcing line in.husky/pre-commitwere deprecated in husky v9. It works today (husky is pinned to ^8), but any future bump breaks the hooks silently.lint-staged(13.x) is two majors behind. - lint-staged PHP entry lints the whole repo:
"*.php": ["composer run lint"]ignores the staged filenames lint-staged passes —phpcs.xmldeclares<file>.</file>, so every PHP commit runs phpcs over the entire tree. Slow, and it fails commits on pre-existing issues unrelated to the change. - License mismatch: the repo
LICENSEis GPL-2.0, but rootpackage.jsondeclares"license": "ISC". - Suspected-dead devDependencies:
nodemon@^2,webpack-cli@^4(alongside webpack 5),ts-loader,clean-webpack-plugin,webpack-node-externals,@babel/plugin-transform-class-static-block— no root script references any of them; they look like leftovers from a previous_binbuild setup. - Generated
_appartifacts committed:_app/vite.config.js,_app/vite.config.d.ts(compiled fromvite.config.ts) and_app/tsconfig.node.tsbuildinfo.
Proposed fix
- Migrate to husky v9 conventions (
"prepare": "husky", drop the_/husky.shline) and bump lint-staged. - Point the lint-staged PHP entry at
./vendor/bin/phpcs --standard=phpcs.xmldirectly so the staged file paths it appends actually take effect (same review for thelint:js/lint-styleentries). - Fix
package.jsonlicense toGPL-2.0-or-later(check_app/package.jsontoo). - Verify, then remove the suspected-dead devDependencies: grep
_bin/and_app/for imports/usage first; remove only what nothing references. - Gitignore and delete the generated
_appartifacts (keepvite.config.tsas the source of truth).
Deliberately omitted
- A prettier step for
*.{json,md,yml}in lint-staged — the config exists but enforcing it now would leak reformat noise into unrelated PRs. Revisit separately if wanted.
Out of scope
- Workflow/CI changes (#148),
_bincode cleanup (separate issue, coming).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with package.json, .husky/pre-commit, phpcs.xml, _app/package.json, and the repository's ignore rules. Verify suspected dependency usage in _bin/ and _app/ before removing anything, then check the staged-file lint entries and generated artifacts. Done means the proposed tooling, license, dependency, and artifact cleanup is applied without unrelated formatting changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php, typescript, vite, webpack
- Domain
- build-system, developer-experience, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100