Skip to content

Commit

Permalink
Update README.md for flat config changes
Browse files Browse the repository at this point in the history
  • Loading branch information
freaktechnik authored Jan 17, 2024
1 parent 7d09811 commit 4b56bb2
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,7 @@ Alternatively you can use a [configuration](#configurations) included with this

## Configurations

### `array-func/recommended` Configuration

The recommended configuration will set your parser ECMA Version to 2015, since that's when the Array functions and methods were added.
### `recommended` Configuration

Rule | Error level | Fixable
---- | ----------- | -------
Expand All @@ -392,21 +390,21 @@ Rule | Error level | Fixable

#### Using the Configuration

To enable this configuration use the `extends` property in your `.eslintrc.json` config file (may look different for other config file styles):
To enable this configuration, import the plugin and add the config to your eslint config array:

```json
{
"extends": [
"plugin:array-func/recommended"
]
}
```js
import arrayFunc from "eslint-plugin-array-func";

export default [
arrayFunc.configs.recommended,
];
```

### `array-func/all` Configuration
### `all` Configuration

The recommended configuration does not include all rules, since some Array methods
were added after ES2015. The all configuration enables all rules the plugin
contains and sets the ECMA version appropriately.
containsy.

Rule | Error level | Fixable
---- | ----------- | -------
Expand All @@ -419,14 +417,14 @@ Rule | Error level | Fixable

#### Using the Configuration

To enable this configuration use the `extends` property in your `.eslintrc.json` config file (may look different for other config file styles):
To enable this configuration, import the plugin and add the config to your eslint config array:

```json
{
"extends": [
"plugin:array-func/all"
]
}
```js
import arrayFunc from "eslint-plugin-array-func";

export default [
arrayFunc.configs.all,
];
```

## License
Expand Down

0 comments on commit 4b56bb2

Please sign in to comment.