Skip to content

eslint/no-useless-concat Suspicious

What it does

Disallow unnecessary concatenation of literals or template literals

Why is this bad?

It’s unnecessary to concatenate two strings together.

Example

javascript
var foo = "a" + "b";

How to use

To enable this rule in the CLI or using the config file, you can use:

bash
oxlint --deny no-useless-concat
json
{
  "rules": {
    "no-useless-concat": "error"
  }
}

References

Released under the MIT License.