1.0.0 • Published 2 years ago

eslint-plugin-destructure-object v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

eslint-plugin-destructure-object

ESLint object destructuring rules.

Rules

  • Ensure function parameters are not destructured (no-params)
  • Ensure destructured parameters are not renamed (no-rename)

Installation

npm install --save-dev eslint eslint-plugin-destructure-object

Usage

Use the recommended preset.

{
  "extends": ["plugin:destructure-object/recommended"]
}

Alternatively, configure rules individually. The following configuration is equivalent to the recommended preset.

{
  "plugins": ["destructure-object"],
  "rules": {
    "destructure-object/no-params": ["warn", { "allowOnlyParam": true }],
    "destructure-object/no-rename": "warn"
  }
}