To keep destructuring legible without creating unused bindings I typically add an explanatory comment but running through prettier moves the comments to the wrong spots where it ends up obscuring the explanation
Prettier 1.13.6
Playground link
Input:
const [ /* full match */, username, /* role */, /* title */, email ] = user;
Output:
const [, /* full match */ username /* role */ /* title */, , , email] = user;
To keep destructuring legible without creating unused bindings I typically add an explanatory comment but running through
prettiermoves the comments to the wrong spots where it ends up obscuring the explanationPrettier 1.13.6
Playground link
Input:
Output: