{"id":19724,"library":"eslint-plugin-destructuring","title":"eslint-plugin-destructuring","description":"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.","status":"active","version":"2.2.1","language":"javascript","source_language":"en","source_url":"https://github.com/lukeapage/eslint-plugin-destructuring","tags":["javascript","eslint","eslint-plugin","eslintplugin","destructuring"],"install":[{"cmd":"npm install eslint-plugin-destructuring","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-destructuring","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-destructuring","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; required to load and run the plugin.","package":"eslint","optional":false}],"imports":[{"note":"This is a plugin, not a standalone library. It must be loaded via ESLint configuration.","wrong":"require('eslint-plugin-destructuring') // direct require in config file won't work; use plugins array","symbol":"plugin object (default)","correct":"module.exports = { plugins: ['destructuring'], rules: { 'destructuring/no-rename': 'error' } }"},{"note":"The recommended config enables all rules. Use 'plugin:destructuring/recommended' as a string in extends.","wrong":"{ extends: ['eslint-plugin-destructuring/recommended'] } // wrong prefix, must use 'plugin:'","symbol":"Recommended config","correct":"{ extends: ['plugin:destructuring/recommended'] }"},{"note":"Each rule must be prefixed with 'destructuring/' in the rules object.","wrong":"{ rules: { 'no-rename': 'error' } } // missing plugin prefix 'destructuring/'","symbol":"Rule configuration","correct":"{ rules: { 'destructuring/no-rename': ['error', { forbid: 'all' }] } }"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n  plugins: ['destructuring'],\n  extends: ['plugin:destructuring/recommended'],\n  rules: {\n    'destructuring/no-rename': 'error',\n    'destructuring/in-params': ['error', { enforce: 'always' }],\n  },\n};","lang":"javascript","note":"Ensure ESLint is installed as a peer dependency.","description":"Shows how to enable the plugin, extend the recommended config, and override individual rules."},"warnings":[{"fix":"Use 'no-rename': ['error', { allow: [] }] to forbid all renames.","message":"The 'no-rename' rule's 'forbid' option with value 'all' is deprecated in favor of explicit 'allow' list.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Check plugin compatibility; for ESLint 8+, consider using an alternative or patching the plugin.","message":"ESLint 8+ requires plugins to export a 'meta' object with 'name' and 'version'. This plugin may need update.","severity":"breaking","affected_versions":"<=2.2.1"},{"fix":"Disable 'in-methods-params' if using TypeScript or other parameter-handling rules.","message":"The 'in-methods-params' rule may conflict with other plugins like '@typescript-eslint' if method parameters use destructuring.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use 'destructuring/no-rename': ['error', { forbid: ['someName'] }] or remove the option.","cause":"Invalid option value for 'forbid' (should be an array or string, not 'all').","error":"Configuration for rule \"destructuring/no-rename\" is invalid: Value [\"error\",{\"forbid\":\"all\"}] is not a valid rule configuration."},{"fix":"Run 'npm install eslint-plugin-destructuring --save-dev'.","cause":"Plugin not installed or not in node_modules.","error":"ESLint couldn't find the plugin \"eslint-plugin-destructuring\"."},{"fix":"Ensure the plugin is installed locally: 'npm install eslint-plugin-destructuring --save-dev'.","cause":"Plugin not installed, or ESLint is running from a different directory.","error":"Cannot find module 'eslint-plugin-destructuring'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}