Skip to content

Commit 2ef6f83

Browse files
authored
no-array-for-each: Ignore forEach for Effect library (#2783)
1 parent 43bc429 commit 2ef6f83

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

rules/no-array-for-each.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,8 @@ const ignoredObjects = [
384384
'R',
385385
// https://www.npmjs.com/package/p-iteration
386386
'pIteration',
387+
// https://www.npmjs.com/package/effect
388+
'Effect',
387389
];
388390

389391
/** @param {import('eslint').Rule.RuleContext} context */

test/no-array-for-each.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ test.snapshot({
1717
// My other code...
1818
});
1919
`,
20+
// #2758
21+
'Effect.forEach([1,2,3], (n) => Effect.succeed(n))',
2022
],
2123
invalid: [
2224
'foo.forEach?.(element => bar(element))',

0 commit comments

Comments
 (0)