-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Ugly line breaks for variable declarations with JSDoc type comment #9358
Copy link
Copy link
Labels
area:commentsIssues with how Prettier prints commentsIssues with how Prettier prints commentslang: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 2.1.2
Playground link
--parser babelInput:
const foooobar = /** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems || foo);
const foooobar = /** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems + foo);
const foooobar = /** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems || foo) ? foo : bar;Output:
const foooobar = /** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems ||
foo);
const foooobar = /** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems +
foo);
const foooobar = /** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems ||
foo)
? foo
: bar;*Expected:
const foooobar =
/** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems || foo);
const foooobar =
/** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems + foo);
const foooobar =
/** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems || foo)
? foo
: bar;Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:commentsIssues with how Prettier prints commentsIssues with how Prettier prints commentslang: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.