Skip to content

siddiqus/eslint-plugin-no-async-array-methods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-no-async-array-methods

npm version

No async callback for Array methods forEach, map, filter, reduce, some, every, etc.

Installation

$ npm i eslint-plugin-no-async-array-methods --save-dev
$ yarn add -D eslint-plugin-no-async-array-methods

Note: You have to install eslint-plugin-no-async-array-methods globally (using the -g flag) if you installed ESLint globally.

Usage

In your .eslintrc configuration file, add no-async-array-methods to the plugins section.

{
    "plugins": [
        "no-async-array-methods"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "no-async-array-methods/no-async-array-methods": 2
    }
} 

Available rules

  • "no-async-array-methods/no-async-array-methods"

    • Bans async forEach, filter, some, every, find, findIndex, map, reduce
  • "no-async-array-methods/all"

    • (same as above)
  • "no-async-array-methods/defaults"

    • Bans async forEach, filter, some, every, find, findIndex
  • "no-async-array-methods/map-reduce"

    • Bans async map, reduce

About

Estlint rule - no async callbacks for array methods

Resources

License

Stars

Watchers

Forks

Packages

No packages published