fix(eslint-plugin): match bare component names after unprefixing#3027
Merged
Conversation
|
@ejhammond must be a member of the Meta Open Source team on Vercel to deploy. Learn more about collaboration on Vercel and other options here. |
Contributor
🚀 Vercel Preview Deployment
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
cixzhang
approved these changes
Jun 24, 2026
5829f5a to
96e8bb3
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
96e8bb3 to
70b7022
Compare
The internal ESLint rules keyed their allowlists/matchers on XDS*-prefixed
names, but core was unprefixed (Badge, BaseProps, Link.tsx, ...) — so the
rules silently stopped matching. Update the functional matching:
- presentational-component: PRESENTATIONAL_COMPONENTS set XDS* -> bare.
- shared: COMPONENT_RULE_ALLOWED set (XDSBaseProps/XDSIconProps/... -> bare).
- require-base-props / require-ref-prop: drop the startsWith('XDS') gate (props
are bare *Props now), match XDSBaseProps -> BaseProps.
- no-hardcoded-anchor: ALLOWED_FILES skip-list XDSLink.tsx/... -> Link.tsx/... so
the Link infrastructure files are exempt again.
- boolean-prop-naming + presentational comments/messages, and rule test fixtures
(XDS*Props -> *Props) so they exercise the real surface.
Product-name 'XDS' in rule descriptions/categories left as-is (prose). Internal
package; no changeset.
70b7022 to
2d7fde8
Compare
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.
Summary
Fixes the internal ESLint plugin's rules, which silently broke after the component unprefixing. The rules keyed their allowlists / matchers on
XDS*-prefixed names, but core is now bare (Badge,BaseProps,Link.tsx, …) — so the matching no longer fired.Functional fixes
presentational-component:PRESENTATIONAL_COMPONENTSsetXDS*→ bare (rule now matchesBadge,Card, … again).shared:COMPONENT_RULE_ALLOWEDset (XDSBaseProps,XDSIconProps,XDSTooltipProps, … → bare).require-base-props/require-ref-prop: dropped thestartsWith('XDS')gate (component props are bare*Propsnow) and matchBasePropsinstead ofXDSBaseProps.no-hardcoded-anchor:ALLOWED_FILESskip-listXDSLink.tsx/XDSLinkProvider.tsx/useXDSLinkComponent.ts→Link.tsx/LinkProvider.tsx/useLinkComponent.ts, so the Link infrastructure files are correctly exempt.Also
boolean-prop-namingillustrative comments + rule test fixtures (XDS*Props→*Props) and the plugin README/docblock examples, so they exercise the real (bare) surface.Scope
Product-name "XDS" in rule descriptions/categories left as-is (prose branding decision). Internal package — no changeset. All rule files pass
node --check;check:sync+check:package-boundariesgreen.