Skip to content

Commit

Permalink
Doc: add description of the option (refs eslint#12545)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-mangoe committed Mar 13, 2021
1 parent 597e136 commit bcf8026
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/rules/no-multi-assign.md
Expand Up @@ -43,6 +43,21 @@ let a = c;
let b = c;
```

## Options

This rule has an object option:

* `"ignoreNonDeclaration": false` (default) disallows using multiple assignments to already declared variables.

Examples of **correct** code for the `{ "ignoreNonDeclaration": true }` option:

```js
/*eslint no-multi-assign: ["error", { ignoreNonDeclaration: true }]*/
const x = {};
const y = {};
x.one = y.one = 1; // this is allowed.
```

## Related Rules

* [max-statements-per-line](max-statements-per-line.md)

0 comments on commit bcf8026

Please sign in to comment.