Formatting lines of code removes one liners

We are having issues trying to get formatting to leave out one liners alone

Take an example like this

BEFORE

const operatorsVMList = _.get(submissionVM, `lobData.pbtWaterCraft.coverables.operators.children`, []);

AFTER

const operatorsVMList = _.get(
    submissionVM,
    `lobData.pbtWaterCraft.coverables.operators.children`,
    []
);

I cannot find a setting which will keep my one liner.  Obviously this is a bit subjective but is there such a rule which could be used to allow this?

0
6 comments

In Settings | Editor | Code Style | JavaScript(TypeScript) | Wrapping and Braces, try setting Method call arguments to Do not wrap- does it help?

0

no, it is already set that way

0
Please could you share a screenshot of this page? Also, do you use Prettier in your app?
0

Prettier IS hooked up but it doesn't affect jsx files

0

Please try disabling Prettier in Settings | Languages & Frameworks | JavaScript | Prettier - does it make any difference?

0

hmmm, yes, that fixed it. now I have to see how to turn that feature off in prettier. i could have sworn this was not affecting things.

thanks

0

Please sign in to leave a comment.