eslint-plugin-remeda
Version:
ESLint plugin for Remeda library.
32 lines (19 loc) ⢠641 B
Markdown
# remeda/collection-method-value
š¼ This rule is enabled in the ā
`recommended` config.
<!-- end auto-generated rule header -->
When using a Remeda collection method, the expression should be used (e.g. assigning to a variable or check in a condition), unless it's a method meant for side effects (e.g. `forEach` or `forOwn`) which should NOT be used.
## Rule Details
This rule takes no arguments.
The following patterns are considered warnings:
```js
x = R.forEach(arr, g);
R.map(arr, f);
```
The following patterns are not considered warnings:
```js
x = R.map(arr, f);
R.forEach(arr, g);
if (R.some(arr, h)) {
i();
}
```