eslint-plugin-mutation

1.0.0 • Public • Published

eslint-plugin-mutation

Checks for mutations of objects. Allows a whitelist of mutable objects.

Getting started

Installation

npm i --save-dev eslint-plugin-mutation

Usage

Add the following to your .eslintrc

By default, "this" and "global" are allowed to be mutated.

  plugins: [
    "mutation"
  ],
  rules: {
    "mutation/no-mutation": 2
  }

This can be customized.

  plugins: [
    "mutation"
  ],
  rules: {
    "mutation/no-mutation": [2, {exceptions: ["this", "that", "global", "window"]}]
  }

Contributing

Please submit a PR.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    102
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    102

Package Sidebar

Install

npm i eslint-plugin-mutation

Weekly Downloads

82

Version

1.0.0

License

ISC

Last publish

Collaborators

  • peterkhayes