-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Prettier should not convert export {a as a} to export {a} #9434
Copy link
Copy link
Labels
lang:javascriptIssues affecting JSIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Description
Prettier pr-9408
Playground link
--parser babelInput:
export {a as a} from 'a'Output:
export { a } from "a";Expected behavior:
export { a } from "a";And comment will lost
Prettier pr-9408
Playground link
--parser babelInput:
export {a as /* comment */ a} from 'a'Output:
Error: Comment "comment" was not printed. Please report this error!
at https://deploy-preview-9408--prettier.netlify.app/lib/standalone.js:15:111760
at Array.forEach (<anonymous>)
at Object.ensureAllCommentsPrinted (https://deploy-preview-9408--prettier.netlify.app/lib/standalone.js:15:111727)
at Xi (https://deploy-preview-9408--prettier.netlify.app/lib/standalone.js:15:117453)
at Yi (https://deploy-preview-9408--prettier.netlify.app/lib/standalone.js:15:119639)
at formatWithCursor (https://deploy-preview-9408--prettier.netlify.app/lib/standalone.js:15:119759)
at https://deploy-preview-9408--prettier.netlify.app/lib/standalone.js:55:37207
at Object.format (https://deploy-preview-9408--prettier.netlify.app/lib/standalone.js:55:37290)
at formatCode (https://deploy-preview-9408--prettier.netlify.app/worker.js:115:21)
at handleMessage (https://deploy-preview-9408--prettier.netlify.app/worker.js:66:18)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
lang:javascriptIssues affecting JSIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.