Skip to content

JoeTheDave/eslint-plugin-no-param-reassign-allow-reduce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-no-param-reassign-allow-reduce

The rule no-param-reassign is a worthwhile rule to enable but array.reduce() requires you to break this rule. Use this rule instead which allows you to enable the rule but does not throw errors when you do this within the contex of the array.reduce function.

npm Package

Installation

$ npm i eslint-plugin-no-param-reassign-allow-reduce

Usage

Add no-param-reassign-allow-reduce to the plugins section of your .eslintrc configuration file and add the rules to the rule section.

{
  "plugins": ["no-param-reassign-allow-reduce"]
}

...

{
  "rules": {
    "no-param-reassign-allow-reduce/allow-reduce": 2,
    "no-param-reassign-allow-reduce/no-reduce-identifiers": 2
  }
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published