Skip to content

Commit

Permalink
Disable enforceForRenamedProperties for prefer-destructuring (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg authored and sindresorhus committed Feb 14, 2018
1 parent 652a6e5 commit 6245086
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/options-manager.js
Expand Up @@ -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'
Expand Down
8 changes: 2 additions & 6 deletions test/options-manager.js
Expand Up @@ -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);
});
Expand All @@ -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');
});
Expand Down

0 comments on commit 6245086

Please sign in to comment.