Skip to content
Permalink
Browse files
Disable enforceForRenamedProperties for prefer-destructuring (#297)
  • Loading branch information
pvdlg authored and sindresorhus committed Feb 14, 2018
1 parent 652a6e5 commit 6245086b24c3526698a50071b3525de0ab86dff0
Showing 2 changed files with 3 additions and 7 deletions.
@@ -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'
@@ -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');
});

0 comments on commit 6245086

Please sign in to comment.