Skip to content

eslint/no-multi-str Style

What it does

Disallow multiline strings.

Why is this bad?

Some consider this to be a bad practice as it was an undocumented feature of JavaScript that was only formalized later.

Example

javascript
var x =
  "Line 1 \
 Line 2";

How to use

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

bash
oxlint --deny no-multi-str
json
{
  "rules": {
    "no-multi-str": "error"
  }
}

References

Released under the MIT License.