🐊Putout plugin adds ability to split nested destructuring
npm install @putout/plugin-split-nested-destructuring[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-split-nested-destructuring.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-split-nested-destructuring "npm"
> - Don't use nested destructuring on data that comes from any external data sources (such as REST APIs, GraphQL endpoints or files).
> - Don't use nested destructuring on function arguments that have long or complicated signatures.
>
> (c) Destructuring in JavaScript: the not so good parts
🐊Putout plugin adds ability to split nested destructuring. Merged with @putout/plugin-destructuring.
```
npm i @putout/plugin-split-nested-destructuring -D
`json`
{
"rules": {
"split-nested-destructuring": "on"
}
}
`js
const {
a: {
b,
},
a: {
b: x,
},
} = c;
function f({a: {b}}) {
console.log(b);
}
`
`js
const {a} = c;
const {b, b: x} = a;
function f({a}) {
const {b} = a;
console.log(b);
}
``
MIT