Search code examples
intellij-ideaprettier

How to make the IntelliJ IDEA family IDEs highlight the Prettier issues without automatically fix them?


Currently, the IntelliJ IDEA does not highlight the issue in the 3rd line:

enter image description here

{
  "semi": true
}
const foo = 1;
const bar = 2;
const baz = 3

I don't the appropriate flags in the IntelliJ IDEA settings.

enter image description here

If to compare the Prettier settings interface with ESLint settings interface, in the ESLint case it's required to select the "Automatic ESLint configuration" or "Manual ESLint configuration", and if IntelliJ IDEA will find the valid configuration file, the issues highlighting will be activated.

enter image description here


Solution

  • Prettier is a formatter and not a linter, it doesn't itself produce any errors or warnings; if you like code style issues to be highlighted in the editor as errors, you need using ESLint with eslint-plugin-prettier