# no-multi-str

> Disallow strings that continue on the next line with a backslash

A backslash at the end of a line lets a quoted string continue on the next line. The line break is dropped, but the next line's indentation becomes part of the string. One space after the backslash is a syntax error that's hard to see.

Strings in JSX attributes can span lines without a backslash. They aren't reported.

{/* Generated by src/codegen/lint-rule-docs.ts. Do not edit this section. */}

## Configure

Off by default. To turn it on:

```toml bunfig.toml
[lint.rules]
"no-multi-str" = "error" # or "warn"
```

{/* End of the generated section. */}

## Examples

Reported:

{/* bad */}
```js
const help = "Usage: deploy <target> \
  --dry-run";
```

Not reported:

{/* good */}
```js
const help = "Usage: deploy <target> " +
  "--dry-run";

const usage = `Usage: deploy <target>
  --dry-run`;
```

{/* good */}
```jsx
const banner = <Banner text="Deploys are paused
  until Monday" />;
```
