Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: no-unused-vars ignoreRestSiblings check assignments (fixes #14163) #14264

Merged
merged 3 commits into from
Apr 3, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add example
  • Loading branch information
yeonjuan committed Apr 2, 2021
commit e556f5112f71d22d8d1d7aea87869ec63bd8668f
7 changes: 5 additions & 2 deletions docs/rules/no-unused-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,11 @@ Examples of **correct** code for the `{ "ignoreRestSiblings": true }` option:

```js
/*eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }]*/
// 'type' is ignored because it has a rest property sibling.
var { type, ...coords } = data;
// 'foo' and 'bar' were ignored because they have a rest property sibling.
var { foo, ...coords } = data;

var bar;
({ bar, ...coords } = data);
```

### argsIgnorePattern
Expand Down