Skip to content

feat(scraps): Add no-double-dollar-interpolation eslint rule#117121

Merged
JoshuaKGoldberg merged 1 commit into
masterfrom
jg/no-double-dollar-interpolation
Jun 9, 2026
Merged

feat(scraps): Add no-double-dollar-interpolation eslint rule#117121
JoshuaKGoldberg merged 1 commit into
masterfrom
jg/no-double-dollar-interpolation

Conversation

@JoshuaKGoldberg

@JoshuaKGoldberg JoshuaKGoldberg commented Jun 8, 2026

Copy link
Copy Markdown
Member

Adds a @sentry/scraps/no-double-dollar-interpolation rule with a fixer. It catches cases like this one from #117031 (comment):

gap: $${p => p.theme.space.md};

Since the existing code is invalid, I just removed it.

A doubled dollar sign in a styled/css template (`gap: $${theme.space.md}`)
emits a literal "$" before the interpolated value, producing an invalid CSS
declaration that the browser silently drops. It is almost always a typo for
`${...}`.

Add an autofixable rule that flags a trailing, unescaped `$` on any non-tail
quasi inside a styled/css tagged template, and fix one existing occurrence in
the MCP onboarding view.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 8, 2026
@JoshuaKGoldberg

Copy link
Copy Markdown
Member Author

@cursor review

@cursor cursor Bot 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 621f7d7. Configure here.

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review June 8, 2026 19:45
@JoshuaKGoldberg JoshuaKGoldberg requested review from a team as code owners June 8, 2026 19:45
@JoshuaKGoldberg JoshuaKGoldberg requested a review from ryan953 June 8, 2026 19:46
@scttcper

scttcper commented Jun 8, 2026

Copy link
Copy Markdown
Member

i'd note that i THINK that i saw the newer stylelint catches these. upgrading required more work than i was ready to do

@JoshuaKGoldberg JoshuaKGoldberg merged commit f874b26 into master Jun 9, 2026
141 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the jg/no-double-dollar-interpolation branch June 9, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants