Skip to content

Commit 4b56bb2

Browse files
authored
Update README.md for flat config changes
1 parent 7d09811 commit 4b56bb2

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

README.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,7 @@ Alternatively you can use a [configuration](#configurations) included with this
379379

380380
## Configurations
381381

382-
### `array-func/recommended` Configuration
383-
384-
The recommended configuration will set your parser ECMA Version to 2015, since that's when the Array functions and methods were added.
382+
### `recommended` Configuration
385383

386384
Rule | Error level | Fixable
387385
---- | ----------- | -------
@@ -392,21 +390,21 @@ Rule | Error level | Fixable
392390

393391
#### Using the Configuration
394392

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

397-
```json
398-
{
399-
"extends": [
400-
"plugin:array-func/recommended"
401-
]
402-
}
395+
```js
396+
import arrayFunc from "eslint-plugin-array-func";
397+
398+
export default [
399+
arrayFunc.configs.recommended,
400+
];
403401
```
404402

405-
### `array-func/all` Configuration
403+
### `all` Configuration
406404

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

411409
Rule | Error level | Fixable
412410
---- | ----------- | -------
@@ -419,14 +417,14 @@ Rule | Error level | Fixable
419417

420418
#### Using the Configuration
421419

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

424-
```json
425-
{
426-
"extends": [
427-
"plugin:array-func/all"
428-
]
429-
}
422+
```js
423+
import arrayFunc from "eslint-plugin-array-func";
424+
425+
export default [
426+
arrayFunc.configs.all,
427+
];
430428
```
431429

432430
## License

0 commit comments

Comments
 (0)