From 6436397f7d5eed79cdc9d32b422090bb0ea7db34 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Thu, 20 Aug 2020 12:19:54 -0230 Subject: [PATCH] Relax prefer-destructuring rules --- config/index.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/config/index.js b/config/index.js index c1691231..addae5dd 100644 --- a/config/index.js +++ b/config/index.js @@ -242,7 +242,22 @@ module.exports = { ], 'prefer-arrow-callback': 'off', 'prefer-const': 'error', - 'prefer-destructuring': 'error', + 'prefer-destructuring': [ + 'error', + { + 'VariableDeclarator': { + 'array': false, + 'object': true, + }, + 'AssignmentExpression': { + 'array': false, + 'object': false, + }, + }, + { + 'enforceForRenamedProperties': false, + }, + ], 'prefer-exponentiation-operator': 'off', 'prefer-named-capture-group': 'off', 'prefer-numeric-literals': 'error',