Repository navigation
ESLint: Link recommended component messages to migration guides - #85752
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: 8.56 MB
|
|
I think this is an improvement over what existed previously, particularly for a human observer seeing the messages in an IDE or in a CI / Terminal lint result. Another angle I'd be looking at this from is for AI agent feedback loops. With Storybook URLs being inaccessible to AI agents I wonder how we can expect them to use it. |
ciampo
left a comment
There was a problem hiding this comment.
I assume this is good to merge?
|
Yes, this is probably good to go. More experimentation on agent-side discoverability in #85757. |
What?
Link directly to Storybook migration guides in the
use-recommended-componentslint messages.Follow up to #85520 (comment).
Why?
The messages currently send developers to the lint rule documentation to find a migration guide. Including the guide URL makes the migration instructions available directly from the diagnostic.
How?
Replace the indirect guidance in eight messages with the existing Storybook URLs for CheckboxControl, the Toggle family, InputControl, RadioControl, TextareaControl, and Tip.
Testing Instructions
@wordpress/use-recommended-componentsenabled, lint named imports ofCheckboxControl,FormToggle,__experimentalInputControl,RadioControl,TextControl,TextareaControl,Tip, andToggleControlfrom@wordpress/components.TextControlshould link to the InputControl guide, and both toggle components should link to the Toggle family guide.