# noUselessStringRaw

Rule `biome/noUselessStringRaw`. Disallow unnecessary `String.raw` function in template string literals without any escape sequence.

- Source: biome
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #579 by reach, #214 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `complexity/noUselessStringRaw` | yes | no | group complexity, since 1.9.4 | [docs](https://biomejs.dev/linter/rules/no-useless-string-raw/) |

## Code examples

### Incorrect: the rule reports this

```js
String.raw`a`;
```

```js
String.raw`a ${v}`;
```

### Correct: the rule accepts this

```js
String.raw`\n ${a}`;
```

```js
String.raw`\n`;
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "complexity": {
        "noUselessStringRaw": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/noUselessReExportAll](https://lintradar.dev/rules/biome/noUselessReExportAll.md): Disallow `export * from` a module that has no named exports.
- [biome/noVoidTypeReturn](https://lintradar.dev/rules/biome/noVoidTypeReturn.md): Disallow returning a value from a function with the return type 'void'
- [biome/noUselessEscapeInString](https://lintradar.dev/rules/biome/noUselessEscapeInString.md): Disallow unnecessary escapes in string literals.
- [biome/noVueMixin](https://lintradar.dev/rules/biome/noVueMixin.md): Disallow the `mixins` option in Vue components.
- [biome/noUselessContinue](https://lintradar.dev/rules/biome/noUselessContinue.md): Avoid using unnecessary `continue`.
- [biome/noZeroLengthUnit](https://lintradar.dev/rules/biome/noZeroLengthUnit.md): Disallow units on zero lengths.

---

Web page: https://lintradar.dev/rules/biome/noUselessStringRaw. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
