Skip to content

Commit

Permalink
RN: Ignore Unused Rest Property Siblings
Browse files Browse the repository at this point in the history
Summary:
Configures ESLint to allow unused variables that are the sibling of a rest property.

For example:

```
// It is okay for `type` to be unused.
const {type, ...coords} = data;
```

Reviewed By: TheSavior

Differential Revision: D8779952

fbshipit-source-id: 1f7b756a75d9363b85e05209ce2a9bb536c5d4da
  • Loading branch information
yungsters authored and facebook-github-bot committed Jul 12, 2018
1 parent a2675ce commit 6ed6bff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
"no-undef": 2, // disallow use of undeclared variables unless mentioned in a /*global */ block
"no-undefined": 0, // disallow use of undefined variable (off by default)
"no-undef-init": 1, // disallow use of undefined when initializing variables
"no-unused-vars": [1, {"vars": "all", "args": "none"}], // disallow declaration of variables that are not used in the code
"no-unused-vars": [1, {"vars": "all", "args": "none", ignoreRestSiblings: true}], // disallow declaration of variables that are not used in the code
"no-use-before-define": 0, // disallow use of variables before they are defined

// Node.js
Expand Down

0 comments on commit 6ed6bff

Please sign in to comment.