@exodus/eslint-plugin-mutable

1.0.0 • 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

850

Version

1.0.0

License

UNLICENSED

Unpacked Size

7.57 kB

Total Files

4

Last publish

Collaborators

  • mbaraniak-exodus
  • maksim-iv-exodus
  • hasakura
  • milanvojnovic
  • olerass-exodus
  • kklash
  • shehryar6
  • rec
  • awilson-rs
  • ggabarrin-rs
  • r4vn
  • exorich
  • cryptosgr
  • mol0d
  • yevhenii_molodyk
  • yilmazbahadir
  • muratso
  • exoleo
  • 633kh4ck
  • ossel
  • davidfraga610
  • clarkexo
  • andrewrexo
  • james-gre
  • juraex
  • richayotte
  • ralph.ba
  • angelloz
  • joshuabot
  • jamiemaw
  • exodus-justin.za
  • javiexodus
  • wcastr
  • rg911
  • alex.alexandrius
  • filipexodus
  • ryansquared-npm
  • andrescarreon
  • florianmathieu
  • janwe
  • fboucquez
  • skapala
  • umito
  • lanahizzle
  • iaacek
  • ps.mcnally
  • akinncar
  • matias.la
  • voltagebots
  • kwwood
  • sergii_bo
  • lekzd
  • cdotta
  • alexandrbbm
  • danh.t.vo
  • ezenwankwogabriel
  • meniem
  • mzndako
  • kevva
  • feri42
  • jprichardson
  • farisissa
  • ryanzim
  • headfire
  • gutenye
  • mosesbot
  • roccomuso
  • dcastagnoli
  • sonaye
  • nareg_exodus
  • ves
  • tenaciousmv
  • asyakost
  • bulgakovk
  • chalker
  • andrejb
  • jaydp17
  • olistic
  • joepie91
  • merlz
  • vbonini
  • devopsrobot
  • jenish-sojitra
  • nachoalvarez
  • giovannirco
  • diegomura
  • lanre-mark
  • sunilagrawal
  • guillecura
  • mariosvlad
  • federico-po
  • pagan404