@@ -379,9 +379,7 @@ Alternatively you can use a [configuration](#configurations) included with this
379
379
380
380
## Configurations
381
381
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
385
383
386
384
Rule | Error level | Fixable
387
385
---- | ----------- | -------
@@ -392,21 +390,21 @@ Rule | Error level | Fixable
392
390
393
391
#### Using the Configuration
394
392
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 :
396
394
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
+ ];
403
401
```
404
402
405
- ### ` array-func/ all` Configuration
403
+ ### ` all ` Configuration
406
404
407
405
The recommended configuration does not include all rules, since some Array methods
408
406
were added after ES2015. The all configuration enables all rules the plugin
409
- contains and sets the ECMA version appropriately .
407
+ containsy .
410
408
411
409
Rule | Error level | Fixable
412
410
---- | ----------- | -------
@@ -419,14 +417,14 @@ Rule | Error level | Fixable
419
417
420
418
#### Using the Configuration
421
419
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 :
423
421
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
+ ];
430
428
```
431
429
432
430
## License
0 commit comments