@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

3,080

Version

2.0.1

License

UNLICENSED

Unpacked Size

8.71 kB

Total Files

5

Last publish

Collaborators

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