|
5 | 5 | Rules for Array functions and methods.
|
6 | 6 |
|
7 | 7 | ## Contents
|
8 |
| - - [Installation](#installation) |
9 |
| - - [Rules](#rules) |
10 |
| - - [`from-map`](#from-map) |
11 |
| - - [Examples](#examples) |
12 |
| - - [`no-unnecessary-this-arg`](#no-unnecessary-this-arg) |
13 |
| - - [Checked Functions](#checked-functions) |
14 |
| - - [Checked Methods](#checked-methods) |
15 |
| - - [Examples](#examples-1) |
16 |
| - - [`prefer-array-from`](#prefer-array-from) |
17 |
| - - [Examples](#examples-2) |
18 |
| - - [`avoid-reverse`](#avoid-reverse) |
19 |
| - - [Examples](#examples-3) |
20 |
| - - [`prefer-flat-map`](#prefer-flat-map) |
21 |
| - - [Examples](#examples-4) |
22 |
| - - [`prefer-flat`](#prefer-flat) |
23 |
| - - [Examples](#examples-55) |
24 |
| - - [Configurations](#configurations) |
25 |
| - - [`array-func/recommended` Configuration](#array-funcrecommended-configuration) |
26 |
| - - [Using the Configuration](#using-the-configuration) |
27 |
| - - [`array-func/all` Configuration](#array-funcall-configuration) |
28 |
| - - [License](#license) |
| 8 | +- [Installation](#installation) |
| 9 | +- [Rules](#rules) |
| 10 | + - [`from-map`](#from-map) |
| 11 | + - [Examples](#examples) |
| 12 | + - [`no-unnecessary-this-arg`](#no-unnecessary-this-arg) |
| 13 | + - [Checked Functions](#checked-functions) |
| 14 | + - [Checked Methods](#checked-methods) |
| 15 | + - [Examples](#examples-1) |
| 16 | + - [`prefer-array-from`](#prefer-array-from) |
| 17 | + - [Examples](#examples-2) |
| 18 | + - [`avoid-reverse`](#avoid-reverse) |
| 19 | + - [Examples](#examples-3) |
| 20 | + - [`prefer-flat-map`](#prefer-flat-map) |
| 21 | + - [Examples](#examples-4) |
| 22 | + - [`prefer-flat`](#prefer-flat) |
| 23 | + - [Examples](#examples-55) |
| 24 | +- [Configurations](#configurations) |
| 25 | + - [`array-func/recommended` Configuration](#array-funcrecommended-configuration) |
| 26 | + - [Using the Configuration](#using-the-configuration) |
| 27 | + - [`array-func/all` Configuration](#array-funcall-configuration) |
| 28 | +- [License](#license) |
29 | 29 |
|
30 | 30 | ## Installation
|
31 | 31 |
|
@@ -76,16 +76,16 @@ The `this` parameter is useless when providing arrow functions, since the `this`
|
76 | 76 | The fix is usually to omit the parameter. The Array methods can't be auto-fixed, since the detection of array methods is not confident enough to know that the method is being called on an array.
|
77 | 77 |
|
78 | 78 | #### Checked Functions
|
79 |
| - - `from` (fixable) |
| 79 | +- `from` (fixable) |
80 | 80 |
|
81 | 81 | #### Checked Methods
|
82 |
| - - `every` |
83 |
| - - `filter` |
84 |
| - - `find` |
85 |
| - - `findIndex` |
86 |
| - - `forEach` |
87 |
| - - `map` |
88 |
| - - `some` |
| 82 | +- `every` |
| 83 | +- `filter` |
| 84 | +- `find` |
| 85 | +- `findIndex` |
| 86 | +- `forEach` |
| 87 | +- `map` |
| 88 | +- `some` |
89 | 89 |
|
90 | 90 | #### Examples
|
91 | 91 | Code that triggers this rule:
|
@@ -262,9 +262,9 @@ Rule | Error level | Fixable
|
262 | 262 | To enable this configuration use the `extends` property in your `.eslintrc.json` config file (may look different for other config file styles):
|
263 | 263 | ```json
|
264 | 264 | {
|
265 |
| - "extends": [ |
266 |
| - "array-func/recommended" |
267 |
| - ] |
| 265 | + "extends": [ |
| 266 | + "array-func/recommended" |
| 267 | + ] |
268 | 268 | }
|
269 | 269 | ```
|
270 | 270 |
|
|
0 commit comments