Skip to content

Commit 6245086

Browse files
pvdlgsindresorhus
authored andcommitted
Disable enforceForRenamedProperties for prefer-destructuring (#297)
1 parent 652a6e5 commit 6245086

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

lib/options-manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const ENGINE_RULES = {
7676
'5.0.0': 'error'
7777
},
7878
'prefer-destructuring': {
79-
'6.0.0': ['error', {array: true, object: true}, {enforceForRenamedProperties: true}]
79+
'6.0.0': ['error', {array: true, object: true}]
8080
},
8181
'unicorn/no-new-buffer': {
8282
'5.10.0': 'error'

test/options-manager.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,7 @@ test('buildConfig: engines: >=6', t => {
200200
t.is(config.rules['unicorn/prefer-spread'], 'error');
201201
// Include rules for Node.js 6 and above
202202
t.is(config.rules['prefer-rest-params'], 'error');
203-
t.deepEqual(config.rules['prefer-destructuring'], [
204-
'error', {array: true, object: true}, {enforceForRenamedProperties: true}
205-
]);
203+
t.deepEqual(config.rules['prefer-destructuring'], ['error', {array: true, object: true}]);
206204
// Do not include rules for Node.js 8 and above
207205
t.is(config.rules['promise/prefer-await-to-then'], undefined);
208206
});
@@ -214,9 +212,7 @@ test('buildConfig: engines: >=8', t => {
214212
t.is(config.rules['unicorn/prefer-spread'], 'error');
215213
// Include rules for Node.js 6 and above
216214
t.is(config.rules['prefer-rest-params'], 'error');
217-
t.deepEqual(config.rules['prefer-destructuring'], [
218-
'error', {array: true, object: true}, {enforceForRenamedProperties: true}
219-
]);
215+
t.deepEqual(config.rules['prefer-destructuring'], ['error', {array: true, object: true}]);
220216
// Include rules for Node.js 8 and above
221217
t.is(config.rules['promise/prefer-await-to-then'], 'error');
222218
});

0 commit comments

Comments
 (0)