eslint-plugin-remeda 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,42 +2,52 @@
2
2
 
3
3
  ESLint plugin for [Remeda](https://github.com/remeda/remeda).
4
4
 
5
+ ## Preamble
6
+
7
+ This plugin was originally derived from [eslint-plugin-lodash-f](https://github.com/AndreaPontrandolfo/eslint-plugin-lodash) (fork of [eslint-plugin-lodash](https://github.com/wix-incubator/eslint-plugin-lodash)) and used that as a base to build upon.
8
+
5
9
  ## Installation
6
10
 
7
11
  First, you'll first need to install [ESLint](https://eslint.org/):
8
12
 
9
13
  ```sh
10
- npm add eslint -D
14
+ pnpm add -D eslint
11
15
  ```
12
16
 
13
17
  Next, install `eslint-plugin-remeda`:
14
18
 
15
19
  ```sh
16
- npm add eslint-plugin-remeda -D
20
+ pnpm add -D eslint-plugin-remeda
17
21
  ```
18
22
 
19
- ## Preamble
20
-
21
- This plugin was originally derived from [eslint-plugin-lodash-f](https://github.com/AndreaPontrandolfo/eslint-plugin-lodash) (fork of [eslint-plugin-lodash](https://github.com/wix-incubator/eslint-plugin-lodash)) and used that as a base to build upon.
22
-
23
23
  ## Rules
24
24
 
25
25
  Enable all of the rules that you would like to use. All rules are off by default, unless you use one of the plugin's configurations which turn all relevant rules on.
26
26
 
27
- - [collection-method-value](docs/rules/collection-method-value.md): Use value returned from collection methods properly.
28
- - [collection-return](docs/rules/collection-return.md): Always return a value in iteratees of Remeda collection methods that aren't `forEach`.
29
- - [prefer-filter](docs/rules/prefer-filter.md): Prefer `R.filter` over `R.forEach` with an `if` statement inside.
30
- - [prefer-find](docs/rules/prefer-find.md): Prefer `R.find` over `R.filter` followed by selecting the first result.
31
- - [prefer-flat-map](docs/rules/prefer-flat-map.md): Prefer `R.flatMap` over consecutive `R.map` and `R.flat`.
32
- - [prefer-map](docs/rules/prefer-map.md): Prefer `R.map` over `R.forEach` with a `push` inside.
33
- - [prefer-nullish-coalescing](docs/rules/prefer-nullish-coalescing.md): Prefer `??` when doing a comparison with a non-nullish value as test.
34
- - [prefer-constant](docs/rules/prefer-constant.md): Prefer `R.constant` over functions returning literals.
35
- - [prefer-is-empty](docs/rules/prefer-is-empty.md): Prefer `R.isEmpty` over manual checking for length value.
36
- - [prefer-is-nil](docs/rules/prefer-is-nil.md): Prefer `R.isNil` over checks for both null and undefined.
37
- - [prefer-remeda-typecheck](docs/rules/prefer-remeda-typecheck.md): Prefer using `R.is*` methods over `typeof` and `instanceof` checks when applicable.
38
- - [prefer-do-nothing](docs/rules/prefer-do-nothing.md): Prefer `R.doNothing` over empty functions.
39
- - [prefer-some](docs/rules/prefer-some.md): Prefer using `R.some` over comparing `findIndex` to -1.
40
- - [prefer-times](docs/rules/prefer-times.md): Prefer `R.times` over `R.map` without using the iteratee's arguments.
27
+ <!-- begin auto-generated rules list -->
28
+
29
+ 💼 Configurations enabled in.\
30
+ Set in the `recommended` configuration.\
31
+ 🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).
32
+
33
+ | Name | 💼 | 🔧 |
34
+ | :------------------------------------------------------------------- | :-- | :-- |
35
+ | [collection-method-value](docs/rules/collection-method-value.md) | ✅ | |
36
+ | [collection-return](docs/rules/collection-return.md) | ✅ | |
37
+ | [prefer-constant](docs/rules/prefer-constant.md) | ✅ | |
38
+ | [prefer-do-nothing](docs/rules/prefer-do-nothing.md) | ✅ | |
39
+ | [prefer-filter](docs/rules/prefer-filter.md) | ✅ | |
40
+ | [prefer-find](docs/rules/prefer-find.md) | ✅ | |
41
+ | [prefer-flat-map](docs/rules/prefer-flat-map.md) | ✅ | |
42
+ | [prefer-is-empty](docs/rules/prefer-is-empty.md) | ✅ | 🔧 |
43
+ | [prefer-is-nullish](docs/rules/prefer-is-nullish.md) | ✅ | |
44
+ | [prefer-map](docs/rules/prefer-map.md) | ✅ | |
45
+ | [prefer-nullish-coalescing](docs/rules/prefer-nullish-coalescing.md) | ✅ | 🔧 |
46
+ | [prefer-remeda-typecheck](docs/rules/prefer-remeda-typecheck.md) | ✅ | |
47
+ | [prefer-some](docs/rules/prefer-some.md) | ✅ | |
48
+ | [prefer-times](docs/rules/prefer-times.md) | ✅ | |
49
+
50
+ <!-- end auto-generated rules list -->
41
51
 
42
52
  ## Contributing
43
53