Skip to content

Add standard tooling configs and migrate to ESLint 9#128

Merged
jeremyfelt merged 1 commit into
trunkfrom
add-standard-tooling-configs
Jun 15, 2026
Merged

Add standard tooling configs and migrate to ESLint 9#128
jeremyfelt merged 1 commit into
trunkfrom
add-standard-tooling-configs

Conversation

@jeremyfelt

Copy link
Copy Markdown
Member

Brings show-hide-section-block in line with our other plugins' tooling.

Changes

  • PHPStan (level 9) — Add phpstan.neon.dist mirroring the shared happyprime/coding-standards config. composer phpstan passes; getting there required fixing the type issues it surfaced:
    • void return types on the four register() functions and register_assets()
    • a precise array-shape type for maybe_enqueue_script()'s $parsed_block
    • a stray 4th argument on a remove_filter() call (it accepts 3)
  • Blueprint — Add blueprint.json for WordPress Playground (WP 7.0, activates the plugin).
  • wp-env — Add .wp-env.json (WP 7.0 / PHP 8.2 / debug flags), plus @wordpress/env and env:* scripts.
  • ESLint 9 — Replace legacy .eslintrc.js with flat-config eslint.config.mjs; update lint/fix scripts to eslint ..
  • Browserslist — Add the standard .browserslistrc; remove the conflicting package.json browserslist field and the now-unused @wordpress/browserslist-config dep.
  • .distignore — Reflect the new/removed config files.

Verification

  • composer phpstan — No errors (level 9)
  • composer phpcs — clean
  • npm run lint — clean (ESLint 9 flat config)
  • npm run build — compiles successfully

🤖 Generated with Claude Code

- Add phpstan.neon.dist at level 9 and fix the type issues it surfaced
  (void return types, parsed-block array shape, stray remove_filter arg)
- Add blueprint.json for WordPress Playground
- Add .wp-env.json plus @wordpress/env and env:* scripts
- Migrate ESLint to flat config (eslint.config.mjs), drop .eslintrc.js,
  update lint/fix scripts to "eslint ."
- Add standard .browserslistrc; remove the conflicting package.json
  browserslist field and unused @wordpress/browserslist-config dep
- Update .distignore for the new/removed config files

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

✅ Plugin Check passed

No errors or warnings from plugin check --categories=plugin_repo.

@jeremyfelt
jeremyfelt merged commit 6a26d6e into trunk Jun 15, 2026
3 checks passed
@jeremyfelt
jeremyfelt deleted the add-standard-tooling-configs branch June 15, 2026 18:30
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