Skip to content

Commit

Permalink
Allow Children in no-fn-reference-in-iterator (#809)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
remcohaszing and sindresorhus committed Sep 18, 2020
1 parent a314ca7 commit 036e440
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions rules/no-fn-reference-in-iterator.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const iteratorMethods = [
const ignoredCallee = [
'Promise',
'React.children',
'Children',
'lodash',
'underscore',
'_',
Expand Down
3 changes: 2 additions & 1 deletion test/no-fn-reference-in-iterator.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ ruleTester.run('no-fn-reference-in-iterator', rule, {
'_.map(fn)',
'Async.map(list, fn)',
'async.map(list, fn)',
'React.children.forEach(children, fn)',
'React.Children.forEach(children, fn)',
'Children.forEach(children, fn)', // `import {Children} from 'react';`
'Vue.filter(name, fn)',

// First argument is not a function
Expand Down

0 comments on commit 036e440

Please sign in to comment.