Add standard tooling configs and migrate to ESLint 9#128
Merged
Conversation
- 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>
2 tasks
✅ Plugin Check passedNo errors or warnings from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings
show-hide-section-blockin line with our other plugins' tooling.Changes
phpstan.neon.distmirroring the sharedhappyprime/coding-standardsconfig.composer phpstanpasses; getting there required fixing the type issues it surfaced:voidreturn types on the fourregister()functions andregister_assets()maybe_enqueue_script()'s$parsed_blockremove_filter()call (it accepts 3)blueprint.jsonfor WordPress Playground (WP 7.0, activates the plugin)..wp-env.json(WP 7.0 / PHP 8.2 / debug flags), plus@wordpress/envandenv:*scripts..eslintrc.jswith flat-configeslint.config.mjs; updatelint/fixscripts toeslint ...browserslistrc; remove the conflictingpackage.jsonbrowserslistfield and the now-unused@wordpress/browserslist-configdep.Verification
composer phpstan— No errors (level 9)composer phpcs— cleannpm run lint— clean (ESLint 9 flat config)npm run build— compiles successfully🤖 Generated with Claude Code