@exodus/eslint-plugin-mutable

2.0.1 • Public • Published

@exodus/eslint-plugin-mutable

Lints your code for modifying function arguments.

function BadCode(someObject) {
  someObject.bad = 'do not mutate objects passed by reference'
}

Installation

yarn add --dev @exodus/eslint-plugin-mutable

// eslintrc.js

module.exports = {
  plugins: ['@exodus/eslint-plugin-mutable'],
  ...
}

Usage

// eslintrc.js

module.exports = {
  ...
  plugins: ['@exodus/eslint-plugin-mutable'],
  rules: {
    '@exodus/mutable/no-param-reassign-prop-only': 'error',
  },
}

Supported Rules

@exodus/mutable/no-param-reassign-prop-only

  • Detects and reports assignment and modification of objects passed as argument to a function

Full Example

// eslintrc.js

module.exports = {
  ...

  plugins: ['@exodus/eslint-plugin-mutable'],
  rules: {
    '@exodus/mutable/no-param-reassign-prop-only': 'error',
  },
}

Readme

Keywords

none

Package Sidebar

Install

npm i @exodus/eslint-plugin-mutable

Weekly Downloads

2,308

Version

2.0.1

License

UNLICENSED

Unpacked Size

8.71 kB

Total Files

5

Last publish

Collaborators

  • juraex
  • kevva
  • doguhan
  • ps.mcnally
  • janwe
  • yevhenii_molodyk
  • javiexodus
  • ismamz
  • exojo
  • feri42
  • jprichardson
  • farisissa
  • ryanzim
  • headfire
  • gutenye
  • mosesbot
  • roccomuso
  • dcastagnoli
  • sonaye
  • ves
  • tenaciousmv
  • asyakost
  • bulgakovk
  • chalker
  • andrejb
  • jaydp17
  • olistic
  • joepie91
  • merlz
  • vbonini
  • mol0d
  • devopsrobot
  • jenish-sojitra
  • markoexodus
  • nachoalvarez
  • giovannirco
  • filipexodus
  • cryptosgr
  • andrescarreon
  • diegomura
  • lanre-mark
  • sunilagrawal
  • guillecura
  • mariosvlad
  • federico-po
  • akinncar
  • fboucquez
  • lanahizzle
  • kwwood
  • umito
  • mzndako
  • joshuabot
  • iaacek
  • meniem
  • skapala
  • awilson-rs
  • ezenwankwogabriel
  • ggabarrin-rs
  • ralph.ba
  • danh.t.vo
  • voltagebots
  • ryansquared-npm
  • alexandrbbm
  • sergii_bo
  • florianmathieu
  • angelloz
  • exodus-justin.za
  • alex.alexandrius
  • rec
  • rg911
  • jamiemaw
  • james-gre
  • shehryar6
  • geoffreyrousset
  • clarkexo
  • tunguyennnnn
  • jschopen
  • cawfree
  • marcos.kichel
  • andrewtoth-exodus
  • cdotta-exodus
  • exorich
  • mmehta-10
  • kryptkeep
  • 633kh4ck
  • mbaraniak-exodus
  • jeehahn
  • hasakura
  • awesomeniko
  • davidexodus
  • r4vn
  • nantoaqui
  • exoleo
  • ale-exo
  • frankliexodus
  • bekatd
  • ronaldcrb
  • muratso
  • metasal