From d6a85ca444300ced199b4397f2785ee3cefe6cdd Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Tue, 13 Feb 2018 13:58:50 -0500 Subject: [PATCH] Disable `enforceForRenamedProperties` for `prefer-destructuring` --- lib/options-manager.js | 2 +- test/options-manager.js | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/options-manager.js b/lib/options-manager.js index c36f29d1..b0c8830f 100644 --- a/lib/options-manager.js +++ b/lib/options-manager.js @@ -76,7 +76,7 @@ const ENGINE_RULES = { '5.0.0': 'error' }, 'prefer-destructuring': { - '6.0.0': ['error', {array: true, object: true}, {enforceForRenamedProperties: true}] + '6.0.0': ['error', {array: true, object: true}] }, 'unicorn/no-new-buffer': { '5.10.0': 'error' diff --git a/test/options-manager.js b/test/options-manager.js index 5cc315aa..2c4cfbf5 100644 --- a/test/options-manager.js +++ b/test/options-manager.js @@ -200,9 +200,7 @@ test('buildConfig: engines: >=6', t => { t.is(config.rules['unicorn/prefer-spread'], 'error'); // Include rules for Node.js 6 and above t.is(config.rules['prefer-rest-params'], 'error'); - t.deepEqual(config.rules['prefer-destructuring'], [ - 'error', {array: true, object: true}, {enforceForRenamedProperties: true} - ]); + t.deepEqual(config.rules['prefer-destructuring'], ['error', {array: true, object: true}]); // Do not include rules for Node.js 8 and above t.is(config.rules['promise/prefer-await-to-then'], undefined); }); @@ -214,9 +212,7 @@ test('buildConfig: engines: >=8', t => { t.is(config.rules['unicorn/prefer-spread'], 'error'); // Include rules for Node.js 6 and above t.is(config.rules['prefer-rest-params'], 'error'); - t.deepEqual(config.rules['prefer-destructuring'], [ - 'error', {array: true, object: true}, {enforceForRenamedProperties: true} - ]); + t.deepEqual(config.rules['prefer-destructuring'], ['error', {array: true, object: true}]); // Include rules for Node.js 8 and above t.is(config.rules['promise/prefer-await-to-then'], 'error'); });