Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Docs: Add prefer-destructuring variable reassignment example (#9873)
* reassignement of variable

add example with a reassignment.

* Docs: add example with object reassignement

* Docs: reassignement of variable #9873

adding a line break before changes
  • Loading branch information
lepirlouit authored and platinumazure committed Feb 2, 2018
1 parent d20f6b4 commit 3afaff6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/rules/prefer-destructuring.md
Expand Up @@ -36,7 +36,11 @@ var foo = array[someIndex];

// With `object` enabled
var { foo } = object;

var foo = object.bar;

let foo;
({ foo } = object.bar);
```

Examples of **incorrect** code when `enforceForRenamedProperties` is enabled:
Expand Down

0 comments on commit 3afaff6

Please sign in to comment.