Registry / testing / eslint-plugin-destructuring

eslint-plugin-destructuring

JSON →
library2.2.1jsnpmunverified

ESLint plugin providing destructuring-specific linting rules, currently at version 2.2.1. It focuses on enforcing consistency and best practices around object and array destructuring patterns, with rules like 'no-rename', 'in-params', and 'in-methods-params'. The plugin is maintained and integrates via ESLint's plugin system, supporting a recommended configuration. It requires ESLint as a peer dependency and is published under the MIT license. Notably, it is one of the few plugins dedicated solely to destructuring, offering targeted rules not found in ESLint core or popular configs like eslint-config-airbnb. Release cadence has slowed since 2019, but it remains functional for ESLint 5/6/7.

npm install eslint-plugin-destructuring
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-DEST
E
eslint-plugin-destructuring
testingjavascriptv2.2.1
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plugin object (default)
✓ module.exports = { plugins: ['destructuring'], rules: { 'destructuring/no-rename': 'error' } }
✗ require('eslint-plugin-destructuring') // direct require in config file won't work; use plugins array
This is a plugin, not a standalone library. It must be loaded via ESLint configuration.
Recommended config
✓ { extends: ['plugin:destructuring/recommended'] }
✗ { extends: ['eslint-plugin-destructuring/recommended'] } // wrong prefix, must use 'plugin:'
The recommended config enables all rules. Use 'plugin:destructuring/recommended' as a string in extends.
Rule configuration
✓ { rules: { 'destructuring/no-rename': ['error', { forbid: 'all' }] } }
✗ { rules: { 'no-rename': 'error' } } // missing plugin prefix 'destructuring/'
Each rule must be prefixed with 'destructuring/' in the rules object.

Shows how to enable the plugin, extend the recommended config, and override individual rules.

// .eslintrc.js module.exports = { plugins: ['destructuring'], extends: ['plugin:destructuring/recommended'], rules: { 'destructuring/no-rename': 'error', 'destructuring/in-params': ['error', { enforce: 'always' }], }, };
Debug
Known issues
deprecatedThe 'no-rename' rule's 'forbid' option with value 'all' is deprecated in favor of explicit 'allow' list.
fix
Use 'no-rename': ['error', { allow: [] }] to forbid all renames.
affects: >=2.0.0
breakingESLint 8+ requires plugins to export a 'meta' object with 'name' and 'version'. This plugin may need update.
fix
Check plugin compatibility; for ESLint 8+, consider using an alternative or patching the plugin.
affects: <=2.2.1
gotchaThe 'in-methods-params' rule may conflict with other plugins like '@typescript-eslint' if method parameters use destructuring.
fix
Disable 'in-methods-params' if using TypeScript or other parameter-handling rules.
affects: >=1.0.0
Errors
Common errors & fixes
Configuration for rule "destructuring/no-rename" is invalid: Value ["error",{"forbid":"all"}] is not a valid rule configuration.
Invalid option value for 'forbid' (should be an array or string, not 'all').
fix
Use 'destructuring/no-rename': ['error', { forbid: ['someName'] }] or remove the option.
ESLint couldn't find the plugin "eslint-plugin-destructuring".
Plugin not installed or not in node_modules.
fix
Run 'npm install eslint-plugin-destructuring --save-dev'.
Cannot find module 'eslint-plugin-destructuring'
Plugin not installed, or ESLint is running from a different directory.
fix
Ensure the plugin is installed locally: 'npm install eslint-plugin-destructuring --save-dev'.
Upgrade
Version history
2.2.1latest on npm
Audit
Dependencies
eslintrequiredPeer dependency; required to load and run the plugin.
Agent activity
8 hits · last 30 days
node
8
Resources
eslint-plugin-destructuring — npm install eslint-plugin-destructuring · libregistry