Skip to content

Commit

Permalink
fix(object-destruct): rules fix for unicorn and eslint fixes #22
Browse files Browse the repository at this point in the history
  • Loading branch information
availity-bot committed Feb 4, 2019
1 parent efd5ec4 commit 51a50d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions base.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,13 @@ module.exports = {
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'no-underscore-dangle': 0,
'promise/avoid-new': 0,
'prefer-destructuring': [
"error",
{
'object': true,
'array': false
}
]

},
};
4 changes: 4 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ function foo(bar) {
bar = 13;
}
// array destructuring
var foo = array[0];
// no-shadow
var a = 3;
function b() {
Expand Down Expand Up @@ -81,6 +84,7 @@ const fn = () => {

// Disabled
expect(find(errors, { ruleId: 'no-param-reassign/sort-comp' })).toBeUndefined();
expect(find(errors, { ruleId: 'prefer-destructuring'})).toBeUndefined();
expect(find(errors, { ruleId: 'class-methods-use-this' })).toBeUndefined();
expect(find(errors, { ruleId: 'no-plusplus' })).toBeUndefined();
expect(find(errors, { ruleId: 'no-underscore-dangle' })).toBeUndefined();
Expand Down

0 comments on commit 51a50d2

Please sign in to comment.