From 6ed6bffe4ea0f42a400a8939e45fc99e6de8286d Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Thu, 12 Jul 2018 16:25:40 -0700 Subject: [PATCH] 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 --- .eslintrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index 395f7d824..e05c065a0 100644 --- a/.eslintrc +++ b/.eslintrc @@ -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