README
@putout/plugin-split-nested-destructuring
putout
plugin adds ability to split nested destructuring.
Install
npm i @putout/plugin-split-nested-destructuring -D
Rule
{
"rules": {
"split-nested-destructuring": "on"
}
}
❌ Incorrect code example
const {a: {b}} = c;
function f({a: {b}}) {
console.log(b);
}
✅ Correct code Example
const {a} = c;
const {b} = a;
function f({a}) {
const {b} = a;
console.log(b);
}
License
MIT