# no-unnecessary-template-expression

Disallow template expressions without text or conversion

A template containing only one interpolation returns that value unchanged when checking proves no conversion is required.
Instead, you SHOULD use the interpolated value directly.

- Category: style
- Level: warning
- Fix: automatic
- Scope: module

## Reported

```ds title="main.ds"
function identity(value: string): string {
    return `${value}`;
}
```

## Accepted

```ds title="main.ds"
function identity(value: string): string {
    return value;
}
```

## Prior art

- [typescript-eslint · no-unnecessary-template-expression](https://typescript-eslint.io/rules/no-unnecessary-template-expression)

[language/linter/src/rules/style/no_unnecessary_template_expression.rs:8](https://github.com/destack-sh/destack/blob/main/language/linter/src/rules/style/no_unnecessary_template_expression.rs#L8)
