# no-useless-concat

Rule `unicorn/no-useless-concat`. Disallow useless concatenation of literals.

- Source: unicorn
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 9.9M weekly downloads of presets that enable it
- Trend: +28.3% last quarter
- Rank: #911 by reach, #1166 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `unicorn/no-useless-concat` | no | safe | package `eslint-plugin-unicorn` | [docs](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v80.0.0/docs/rules/no-useless-concat.md) |
| Biome | `complexity/noUselessStringConcat` | no | safe | group complexity, since 1.8.0 | [docs](https://biomejs.dev/linter/rules/no-useless-string-concat/) |

## Code examples

### Incorrect: the rule reports this

```js
const message = 'Hello, ' + 'world!';
```

```js
const path = directory + '/' + 'file.js';
```

```js
const greeting = `Hello, ${name}` + `! Welcome.`;
```

### Correct: the rule accepts this

```js
const message = 'Hello, world!';
```

```js
const path = directory + '/file.js';
```

```js
const greeting = `Hello, ${name}! Welcome.`;
```

Examples from the ESLint documentation.

## Enable it

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

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

export default [
  {
    plugins: { unicorn },
    rules: {
      "unicorn/no-useless-concat": "error",
    },
  },
];
```

### Biome: `biome.json`

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

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Unicorn recommended](https://lintradar.dev/presets/unicorn-recommended.md) | ESLint | `eslint-plugin-unicorn` | 340 | 9.5M | +30.3% |
| [Unicorn unopinionated](https://lintradar.dev/presets/unicorn-unopinionated.md) | ESLint | `eslint-plugin-unicorn` | 236 | 9.5M | +30.3% |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |

## Related rules

- [eslint/no-useless-concat](https://lintradar.dev/rules/eslint/no-useless-concat.md): Disallow unnecessary concatenation of literals or template literals
- [vue/no-useless-concat](https://lintradar.dev/rules/vue/no-useless-concat.md): Disallow unnecessary concatenation of literals or template literals in `<template>`
- [unicorn/no-unsafe-sqlite-interpolation](https://lintradar.dev/rules/unicorn/no-unsafe-sqlite-interpolation.md): Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
- [unicorn/consistent-export-decorator-position](https://lintradar.dev/rules/unicorn/consistent-export-decorator-position.md): Enforce consistent decorator position on exported classes.
- [unicorn/no-negated-comparison](https://lintradar.dev/rules/unicorn/no-negated-comparison.md): Disallow negated comparisons.
- [unicorn/consistent-optional-chaining](https://lintradar.dev/rules/unicorn/consistent-optional-chaining.md): Enforce consistent optional chaining for same-base member access.

---

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