# no-template-curly-in-string

Disallow template interpolation in regular strings

`${...}` inside a regular string produces literal text because regular strings do not interpolate placeholders.
Instead, you SHOULD use a template literal when interpolation is intended.

- Category: suspicious
- Level: warning
- Fix: suggestion
- Scope: module

## Reported

```ds title="main.ds"
function greet(name: string): string {
    return "hello, ${name}";
}
```

## Accepted

```ds title="main.ds"
function greet(name: string): string {
    return `hello, ${name}`;
}
```

## Prior art

- [ESLint · no-template-curly-in-string](https://eslint.org/docs/latest/rules/no-template-curly-in-string)

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