-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Labels
area:commentsIssues with how Prettier prints commentsIssues with how Prettier prints commentsdifficulty:hardIssues that might take an entire weekend, or require a tough decision to fixIssues that might take an entire weekend, or require a tough decision to fixlang:javascriptIssues affecting JSIssues affecting JS
Description
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
--parser babylonInput:
const [ /* full match */, username, /* role */, /* title */, email ] = user;Output:
const [, /* full match */ username /* role */ /* title */, , , email] = user;Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:commentsIssues with how Prettier prints commentsIssues with how Prettier prints commentsdifficulty:hardIssues that might take an entire weekend, or require a tough decision to fixIssues that might take an entire weekend, or require a tough decision to fixlang:javascriptIssues affecting JSIssues affecting JS