disable multiline ternary in prettier

Viewed 1308

Is there way to config prettier to prevent not multi line the ternary operation?

wanted this:

const route = routeModule.config ? routeModule.config(router) : routeModule(router);

not this:

  const route = routeModule.config
        ? routeModule.config(router)
        : routeModule(router);

My prettier.config.js :

module.exports = {
    trailingComma: 'es5',
    tabWidth: 4,
    semi: true,
    singleQuote: true,
    printwidth: 200,
    bracketspacings: true,
};
0 Answers
Related