Skip to content

BPS-10: Gutenberg tooling and folder structure in generated plugins - #56

Merged
krugazul merged 7 commits into
developfrom
feat/bps-10-generated-tooling
Oct 28, 2026
Merged

krugazul merged 7 commits into
developfrom
feat/bps-10-generated-tooling

Conversation

@krugazul

@krugazul krugazul commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Part of BPS-10 (#55): generated plugins now include the required tooling and Gutenberg folder structure. Each change was proven in lightspeedwp/ls-test (feat/bps-10-generated-tooling) and moved back into plugin-template/.

Changes (one commit per item)

  1. Root files: SECURITY.md, CONTRIBUTING.md, changelog.txt, .gitattributes.
  2. Lint configs: Gutenberg names (eslint.config.mjs, prettier.config.mjs, .stylelintrc.js, phpcs.xml.dist), the ignore files, .markdownlint.json, .npmpackagejsonlintrc.json, tools/eslint/, BEM class names, and lint:md:docs in npm run lint and check:generation. Template mode removes the scaffold's own copies under the old names.
  3. Build configs: .browserslistrc, postcss.config.mjs, tsconfig.json, tsconfig.build.json, jsconfig.json, tools/webpack/extra-entries.js.
  4. Test layout: test/unit, test/e2e and phpunit/, with the configs, compare-toolchain.js, the generator's format step and the docs updated.
  5. Editor and review: {{slug}}.code-workspace, .coderabbit.yml and docs/ (with the Interactivity API and DataViews guide that DEVELOPMENT.md already linked to).

Fixes

  • Generated plugins had no tests/ or bin/ (2d95fc3). The generator's exclude list for scaffold-only folders also matched them in plugin-template/, so npm run lint:json failed in every generated plugin and generate-plugin.toolchain.test.js failed 14 of 14 on develop.
  • Broken repository links (2659282). USAGE.md and the .pot header built GitHub URLs from {{author}}, which broke for an author with a space. They now use {{repository_url}}.

Decisions

The same as in the ls-test PR: stays on @wordpress/scripts, no jest.config.js (Vitest), TypeScript configs for editors only, Chromium-only Playwright, and TOTOA's agent folders left for separate work.

Testing

  • Round trip: compare-toolchain.js finds no differences between a freshly generated ls-test and ls-test; the generated docs and workspace match too.
  • node scripts/toolchain/check-generation.js: both fixtures pass generate, install, build, every lint step (including lint:md:docs) and test:unit.
  • npx jest scripts: 10 failures, down from 38 on develop. No suite fails that didn't already fail on develop; generate-plugin.toolchain and generate-plugin.functional-only now pass.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Generated plugins now include expanded development, linting, browser-support, and editor configuration, plus a VS Code workspace with common project tasks.
    • Added starter documentation for development, contribution, security, and using the Interactivity API and DataViews.
    • Generated projects now support separate unit, end-to-end, and PHP test folders, along with additional JavaScript build entries.
  • Bug Fixes
    • Restored template documentation, tests, and command-line tools in generated plugins.
    • Updated generated links to use the project’s repository address.

krugazul and others added 7 commits October 28, 2026 14:34
…nd .gitattributes

Moved back from lightspeedwp/ls-test (BPS-10).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The exclude list for scaffold-only folders also matched plugin-template/tests,
bin and docs, so generated plugins had no starter tests or validate-json.js.
Also stops expecting CONTRIBUTING.md and SECURITY.md to be left out, since the
template now ships them (BPS-10).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd Markdown lint

Moved back from lightspeedwp/ls-test (BPS-10). Round trip: toolchain files match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…webpack

Moved back from lightspeedwp/ls-test (BPS-10). Round trip: toolchain files match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moved back from lightspeedwp/ls-test (BPS-10). Round trip: toolchain files match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moved back from lightspeedwp/ls-test (BPS-10). Round trip: toolchain files
match, and the generated workspace, CodeRabbit config and docs match ls-test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Built from {{author}}, the links broke for an author with a space; the
generation check's lint:md:docs step caught it. Uses {{repository_url}}.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Oct 28, 2026

Copy link
Copy Markdown

BPS-10

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Note

Some coding-guideline sources were skipped; the reason is listed next to each one. Other guidelines were applied as usual. On a public repository, sources from your configuration are listed without their names.

Skipped guideline sources: 1
a configured source — couldn't be fetched
Walkthrough

The plugin template and generator now use an updated toolchain and test layout. Generated plugins include additional configuration, workspace, documentation, and community files. Generator exclusions, output formatting, toolchain comparison, and generation checks were updated to match the generated structure.

Changes: Generated Plugin Scaffold

Layer / File(s) Summary
Toolchain and workspace configuration
plugin-template/.*, plugin-template/tools/*, plugin-template/tsconfig*.json, plugin-template/webpack.config.js, plugin-template/{{slug}}.code-workspace, scripts/toolchain/compare-toolchain.js, scripts/toolchain/standard-toolchain.json, plugin-template/DEVELOPMENT.md
The template adds or updates ESLint, Stylelint, Markdown, TypeScript, PostCSS, Prettier, browser-support, editor, and workspace configuration. Webpack extra-entry handling moves to tools/webpack/extra-entries.js. Toolchain comparison includes the new files, and the standard lint workflow adds Markdown documentation linting.
Test layout and generated output
plugin-template/.distignore, plugin-template/{phpcs.xml.dist,phpstan.neon,phpunit.xml,playwright.config.js,vitest.config.mjs}, scripts/generate-plugin.js, scripts/__tests__/generate-plugin.toolchain.test.js, scripts/toolchain/{check-generation.js,compare-toolchain.js,__tests__/*}, docs/GENERATE_PLUGIN.md, plugin-template/{DEVELOPMENT.md,USAGE.md,languages/{{slug}}.pot}
Test paths now use test/unit, test/e2e, and phpunit. The generator copies the template’s tests/, docs/, and bin/ folders, removes old scaffold configuration copies in template mode, and formats JavaScript under test/. Generation and comparison checks, distribution exclusions, generated links, and the generated-plugin file-tree documentation reflect the updated structure.
Project documentation and policies
plugin-template/{CONTRIBUTING.md,SECURITY.md,changelog.txt}, plugin-template/docs/*, plugin-template/{DEVELOPMENT.md,icons/README.md,patterns/README.md}
The template adds contribution and security guidance, a starter changelog, a documentation index, and Interactivity API and DataViews examples. It also updates test and build instructions and makes small documentation-formatting changes.

Priority: Not assessed

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Possibly related issues

Possibly related PRs

  • lightspeedwp/block-plugin-scaffold#47: It specifies the toolchain modernization, flat ESLint configuration, Playwright setup, generated-plugin validation, and starter test folders updated here.
Merge Risk: Low · up to 26592

The generated plugin remains mergeable with bounded follow-up, but developers using its PostCSS extension point or following the new DataViews guide may get missing plugins, incorrect table behaviour, a failed mount, or unstyled controls.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Comment @coderabbitai help to get the list of available commands.

@krugazul
krugazul marked this pull request as ready for review October 28, 2026 13:49
@krugazul
krugazul merged commit dc436d8 into develop Oct 28, 2026
5 of 20 checks passed
@krugazul
krugazul deleted the feat/bps-10-generated-tooling branch October 28, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant