Intellij "reformat code" command doesn't follow prettier rules

Viewed 1241

I created a Vue project via Quasar, picking Prettier as ESLint preset.

When I try the "reformat code" command, it doesn't follow completely the prettier rules. In the specific, I found problems when it has to ignore stuff.

For example:

Having these prettier rules (.prettierrc file):

{
  "singleQuote": true,
  "semi": false
}

when I try "reformat code" with this code

//prettier-ignore
  name: "App"

it will convert double quotes to single quotes.

If I use "reformat with prettier" everything works fine, but is there a way to override the reformat code behavior?

I'm asking this also because in the commit changes dialog there is the "reformat code" option that I would like to use. I don't know if it's maybe possible to add a "reformat code with prettier" option there

1 Answers
Related