Eslint and prettier conflict on operator-linebreak rule

后端 未结 1 1281
天命终不由人
天命终不由人 2021-01-13 02:26

I have some eslint and prettier config. When I hit ctrl + s to save my code my eslint is trying to format the code like this :

        (errors.password
              


        
1条回答
  •  清酒与你
    2021-01-13 02:54

    According to prettier doc:

    Prettier has a few options because of history. But we don’t want more of them. Prettier is not a kitchen-sink code formatter that attempts to print your code in any way you wish. It is opinionated.

    Quoting the Why Prettier? page: By far the biggest reason for adopting Prettier is to stop all the on-going debates over styles.

    Prettier ships with a handful of format options, some of them are:

    • Tab Width
    • Tabs
    • Semicolons
    • Quotes
    • Quote Props
    • JSX Quotes
    • Trailing Commas

    But these options doesn't include what you are looking for.

    0 讨论(0)
提交回复
热议问题