WordPress / WordPress/block-development-examples
_bin CLI: no type-checking, dead npm hook that breaks table regeneration, docs describing nonexistent automation
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 334
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Description
Problem
The _bin/ TypeScript CLI maintains the README examples table and the dates metadata, but nothing keeps it healthy:
- No type-checking anywhere. It runs via
ts-node(which skips type checks),.eslintrcignores_bin/**/*entirely, and no script or workflow runstsc --noEmit—_bin/README.mditself admits types are left to the editor. A type error ships silently until someone runs the command. - Dead npm hook:
"postcreate-example:new"in rootpackage.jsonnever fires — npm's post-hook for thecreate-examplescript would be namedpostcreate-example. The intended "install + regenerate the README table after scaffolding" step silently doesn't happen, which is one likely source of_data/README drift (#152). - Docs describe things that don't exist:
_bin/README.mdreferences aCHANGELOG.mdand a GitHub Actionupdate-dates.yml; neither exists in the repo.dates:updateis manual-only despite the docs claiming automation. - Unpinned scaffold:
create-exampleinvokes@wordpress/create-block@latest, so newly scaffolded examples drift from the repo's toolchain baseline. - Dead constant:
_bin/src/constants.tsexportsPROJECT_FOLDER_NAME = 'bde-fork'(a leftover developer-local fork name) that nothing references.
Proposed fix
- Add a
"typecheck": "tsc --noEmit -p _bin/tsconfig.json"script and wire it intostatic-linting.yml(eslint coverage for_bindeliberately skipped —tscgives most of the value without TS-parser config work). - Rename the hook to
postcreate-exampleso table regeneration actually runs after scaffolding. - Fix
_bin/README.md: remove theCHANGELOG.mdreference and documentdates:updateas a manual maintainer step (noupdate-dates.ymlautomation — the repo's change velocity doesn't justify a bot PR loop). - Pin the
@wordpress/create-blockversion increate-exampleto match the repo's wp-scripts baseline (see #150 PR 2). - Delete the dead
PROJECT_FOLDER_NAMEconstant.
Out of scope
_datacontent fixes (#152); devDependency pruning (#153).
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, _bin/tsconfig.json, static-linting.yml, _bin/README.md, and _bin/src/constants.ts. Check the existing create-example script, linting workflow, CLI documentation, and constant references before making the requested maintenance changes. Done means type-checking is wired into CI, the hook and scaffold version are corrected, stale documentation is removed, and the unused constant is gone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, javascript, typescript, wordpress
- Domain
- ci-cd, cli, documentation, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100