Skip to content

Conversation

@mateus
Copy link
Member

@mateus mateus commented Jan 7, 2026

This PR updates the @shopify/jsx-no-hardcoded-content ESLint rule to detect hardcoded strings within conditional (ternary) and logical expressions (&&, ||). Previously, expressions like the following were not flagged:

aria-label={showPassword ? 'Hide password' : 'Show password'}

Changes

  • Updated isInvalidContent to recursively check ConditionalExpression and LogicalExpression.

@mateus
Copy link
Member Author

mateus commented Jan 7, 2026

/snapit

@mateus mateus requested a review from BPScott January 7, 2026 22:33
@mateus
Copy link
Member Author

mateus commented Jan 8, 2026

/snapit

Copy link
Member

@BPScott BPScott left a comment

Choose a reason for hiding this comment

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

Code changes seem good. We should fix the publishing to use OIDC before we merge this, so we can get the snapit back to working correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants