Repository navigation
ESLint: Require WCCard alias for legacy Card imports - #85519
Conversation
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: 0 B Total Size: 9.06 MB
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Custom Completer: should allow newlines after multiple option completions in
|
aduth
left a comment
There was a problem hiding this comment.
LGTM 👍
Assuming that deprecations and migrations will continue, do we have the general process outlined anywhere? For my own review confidence, but also something we could delegate to AI agents for implementation and review.
|
Not in one place yet. The pieces are spread out between the soft-deprecation steps in the components contributing guide, the Design System packages guide for parity and compatibility checks, and the I agree it should be written down. I'll look into this. |
What?
Require
Cardfrom@wordpress/componentsto be imported asWCCard.Why?
Distinguish the legacy component from
Cardin@wordpress/ui, following the existing naming convention for legacy components.How?
Add
Card: 'WCCard'to the repository's@wordpress/use-import-asconfiguration and update the six existing consumers to use that alias.Testing Instructions
import { Card } from '@wordpress/components';and confirm the editor's ESLint diagnostic requires theWCCardalias.import { Card as WCCard } from '@wordpress/components';and confirm the diagnostic clears.import { Card } from '@wordpress/ui';does not produce an import-alias diagnostic.