no-unnecessary-template-expression
Added in v0.1.4Configuration
rslint.config.ts
Rule Details
Disallow unnecessary expressions inside template literals and template literal types.
Literal interpolations can be written directly into the surrounding template. When a template contains only one string-typed expression, the template wrapper can be removed entirely. The rule provides an autofix for both forms while preserving template escapes.
Examples of incorrect code for this rule:
Examples of correct code for this rule: