# ts-no-unnecessary-template-expression

Rule `jsdoc/ts-no-unnecessary-template-expression`. Catches unnecessary template expressions such as string expressions within a template literal.

- Source: jsdoc
- Technologies: JSDoc
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #2114 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `jsdoc/ts-no-unnecessary-template-expression` | no | safe | package `eslint-plugin-jsdoc` | [docs](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-unnecessary-template-expression.md#repos-sticky-header) |

## Code examples

### Incorrect: the rule reports this

```ts
/**
 * @type {`A${'B'}`}
 */
```

### Correct: the rule accepts this

```ts
/**
 * @type {`AB`}
 */
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import jsdoc from "eslint-plugin-jsdoc";

export default [
  {
    plugins: { jsdoc },
    rules: {
      "jsdoc/ts-no-unnecessary-template-expression": "error",
    },
  },
];
```

## Related rules

- [jsdoc/ts-ban-ts-comment](https://lintradar.dev/rules/jsdoc/ts-ban-ts-comment.md): Disallows (or requires descriptions for) `@ts-<directive>` comments, mirroring `@typescript-eslint/ban-ts-comment`.
- [jsdoc/ts-prefer-function-type](https://lintradar.dev/rules/jsdoc/ts-prefer-function-type.md): Prefers function types over call signatures when there are no other properties.
- [jsdoc/text-escaping](https://lintradar.dev/rules/jsdoc/text-escaping.md): Auto-escape certain characters that are input within block and tag descriptions.
- [jsdoc/type-formatting](https://lintradar.dev/rules/jsdoc/type-formatting.md): Formats JSDoc type values.
- [jsdoc/sort-tags](https://lintradar.dev/rules/jsdoc/sort-tags.md): Sorts tags by a specified sequence according to tag name, optionally adding line breaks between tag groups.
- [jsdoc/require-throws](https://lintradar.dev/rules/jsdoc/require-throws.md): Requires that throw statements are documented with `@throws` tags.

---

Web page: https://lintradar.dev/rules/jsdoc/ts-no-unnecessary-template-expression. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
