Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable enforceForRenamedProperties for prefer-destructuring #297

Merged
merged 1 commit into from Feb 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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