Skip to content

ESLint: Link recommended component messages to migration guides - #85752

Merged
mirka merged 5 commits into
trunkfrom
link-recommended-component-migration-guides
Oct 27, 2026
Merged

mirka merged 5 commits into
trunkfrom
link-recommended-component-migration-guides

Conversation

@mirka

@mirka mirka commented Oct 27, 2026

Copy link
Copy Markdown
Member

What?

Link directly to Storybook migration guides in the use-recommended-components lint 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

  1. With @wordpress/use-recommended-components enabled, lint named imports of CheckboxControl, FormToggle, __experimentalInputControl, RadioControl, TextControl, TextareaControl, Tip, and ToggleControl from @wordpress/components.
  2. Confirm each diagnostic includes a direct Storybook migration guide URL. TextControl should link to the InputControl guide, and both toggle components should link to the Toggle family guide.
  3. Open the URLs and confirm they lead to the corresponding migration guides.

@mirka mirka added the [Type] Enhancement A suggestion for improvement. label Oct 27, 2026
@mirka mirka self-assigned this Oct 27, 2026
@github-actions github-actions Bot added the [Tool] ESLint plugin /packages/eslint-plugin label Oct 27, 2026
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: aduth <aduth@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: 0 B

Total Size: 8.56 MB

d2d9176 Run

@aduth

aduth commented Oct 27, 2026

Copy link
Copy Markdown
Member

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.

@mirka
mirka requested a review from a team October 27, 2026 14:16
@mirka
mirka marked this pull request as ready for review October 27, 2026 14:20

@ciampo ciampo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is good to merge?

@mirka

mirka commented Oct 27, 2026

Copy link
Copy Markdown
Member Author

Yes, this is probably good to go. More experimentation on agent-side discoverability in #85757.

@mirka
mirka enabled auto-merge (squash) October 27, 2026 17:21
@mirka
mirka merged commit 4dbf80f into trunk Oct 27, 2026
111 of 113 checks passed
@mirka
mirka deleted the link-recommended-component-migration-guides branch October 27, 2026 17:27
@github-actions github-actions Bot added this to the Gutenberg 24.4 milestone Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Tool] ESLint plugin /packages/eslint-plugin [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants