RN: Ignore Unused Rest Property Siblings
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
This commit is contained in:
parent
a2675ced4e
commit
6ed6bffe4e
|
@ -143,7 +143,7 @@
|
||||||
"no-undef": 2, // disallow use of undeclared variables unless mentioned in a /*global */ block
|
"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-undefined": 0, // disallow use of undefined variable (off by default)
|
||||||
"no-undef-init": 1, // disallow use of undefined when initializing variables
|
"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
|
"no-use-before-define": 0, // disallow use of variables before they are defined
|
||||||
|
|
||||||
// Node.js
|
// Node.js
|
||||||
|
|
Loading…
Reference in New Issue