Enable no-unnecessary-template-expression - #307
Merged
Conversation
One template literal wrapped a lone ternary that already produced a string. Autofix replaced it with the parenthesized expression; the concatenation result is byte-identical. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ryanhugh
enabled auto-merge (squash)
August 13, 2026 19:18
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.
Turns on
@typescript-eslint/no-unnecessary-template-expressionin the type-aware rules block. It flags a template literal whose only content is a single interpolation of something already typedstring— the backticks and${}are doing no work.1 violation, auto-fixable, fixed by
eslint --fix.Per-fix behavior analysis
scrapers/myChart/proxyTools.ts:174, in the messagerunSwitchProxyTargetreturns:The ternary yields a
stringin both branches, so the template wrapper was an identity operation —`${s}`issfor anystrings. The concatenation that consumes it produces the same characters either way. The two adjacent lines in the same expression keep their templates, correctly: they interpolate alongside literal text, so the rule leaves them alone.Purely cosmetic; the emitted strings are identical.
Verification
npx eslint .cleanbun run typecheckcleancd expo-app && bun run typecheckcleanbun run test— 1517 pass, 0 fail🤖 Generated with Claude Code