Skip to content

Commit

Permalink
Merge pull request #218 from Availity/fix/no-reduce
Browse files Browse the repository at this point in the history
fix: remove no reduce lint rule
  • Loading branch information
nylon22 authored Apr 22, 2021
2 parents fe335b8 + 7ce59e9 commit 345567e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions base.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,6 @@ module.exports = {
},
],
'unicorn/prefer-node-append': 0,
'unicorn/no-reduce': 0,
},
};
4 changes: 4 additions & 0 deletions tests/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,8 @@ function readFile(filename, callback) {
// unicorn/prefer-math-trunc
var targetLength = 1;
targetLength >>= 0;
// unicorn/no-reduce
var array = [1, 2, 3]
var result = array.reduce((acc, current) => acc + current)
`;
1 change: 1 addition & 0 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ describe('rules', () => {
expect(find(errors, { ruleId: 'unicorn/prefer-math-trunc' })).toBeUndefined();
expect(find(errors, { ruleId: 'no-restricted-syntax' })).toBeUndefined();
expect(find(errors, { ruleId: 'global-require' })).toBeUndefined();
expect(find(errors, { ruleId: 'unicorn/no-reduce' })).toBeUndefined();
});

test('react', () => {
Expand Down

0 comments on commit 345567e

Please sign in to comment.