chore: update deps#34
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the project’s JS/PHP tooling dependencies and migrates ESLint to v10’s flat config approach, aligning lint/test tooling with newer WordPress packages.
Changes:
- Bump NPM and Composer dependencies (notably
@wordpress/scripts,@wordpress/eslint-plugin, PHPStan). - Replace legacy ESLint config (
.eslintrc.js/.eslintignore) witheslint.config.mjs(flat config) and update references in docs/workflows. - Adjust TypeScript config to include Jest/Node types and update a PHPUnit compatibility shim in the PHP test base.
Reviewed changes
Copilot reviewed 10 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tsconfig.json |
Adds global Jest/Node types; excludes eslint.config.mjs from TS compilation. |
tests/php/TestCase.php |
Updates PHPUnit annotation compatibility logic (but introduces a namespacing bug). |
src/blocks/interactive-block/__tests__/view.test.ts |
Removes an ESLint suppression comment around a non-null assertion. |
playwright.config.ts |
Removes an ESLint suppression comment on a require usage. |
package.json |
Updates WordPress/tooling devDependencies and overrides. |
eslint.config.mjs |
Introduces ESLint flat config using WordPress + Jest presets and project rules. |
docs/DEVELOPMENT.md |
Updates docs to reference the new ESLint config file. |
composer.lock |
Updates locked PHP dependencies (e.g., PHPStan). |
README.md |
Updates ESLint config link to eslint.config.mjs. |
.github/workflows/test-public-workflows.yml |
Updates workflow path filters to track eslint.config.mjs. |
.eslintrc.js |
Removed (migrated to flat config). |
.eslintignore |
Removed (migrated to flat config ignores). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public function getAnnotations(): array { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid -- Required compatibility method name. | ||
| $class_reflection = new \ReflectionClass( static::class ); | ||
| $method_name = method_exists( $this, 'name' ) ? $this->name() : $this->getName( false ); | ||
| $class_reflection = new ReflectionClass( static::class ); |
There was a problem hiding this comment.
ReflectionClass is referenced unqualified inside the rtCamp\Plugin_Skeleton_D\Tests namespace, so PHP will try to resolve rtCamp\Plugin_Skeleton_D\Tests\ReflectionClass and this will fatal at runtime. Use the global \ReflectionClass (as before) or add use ReflectionClass; at the top of the file.
| $class_reflection = new ReflectionClass( static::class ); | |
| $class_reflection = new \ReflectionClass( static::class ); |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #34 +/- ##
=========================================
Coverage 94.94% 94.94%
Complexity 115 115
=========================================
Files 21 21
Lines 475 475
=========================================
Hits 451 451
Misses 24 24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
What
Updates NPM and composer dependencies to their latest versions.
Specifically eslint is now using v10 with the flat config.
Why
Related Issue(s):
How
Testing Instructions
Screenshots
Additional Info
Checklist