Prettier integration by ESlint rules

Hi, I have a question.  I created the rules in ESlint, how can I make Prettier format the code according to the rules specified in ESlint.

after saving, Prettier automatically formats the code.

I want to use Prettier and ESlint. without using .prettierrc.js -> singleQuote: true,. in order for Prettier to format the file according to the ESlint rules, before saving, Prettier takes the rules specified in eslintrc.js and formats the code
How can i do this
7 comments
Comment actions Permalink

In VSCode User Settings, set "prettier.eslintIntegration": true

what about webstorm

0
Comment actions Permalink

There is no such integration, but you can try using https://github.com/prettier/prettier-eslint plugin

0
Comment actions Permalink

I'm afraid it won't solve my problem.

0
Comment actions Permalink

But this is what VSCode is using when prettier.eslintIntegration is enabled: https://github.com/prettier/prettier-vscode#vscode-specific-settings

0
Comment actions Permalink

Why are people talking about vsCode this is IntelliJidea

0
Comment actions Permalink

Hey Stephen
I'm looking for solutions for the same issue

Did you find any solutions or workaround?

Thank you
Claudio

 
0
Comment actions Permalink

You can't configure Prettier to use ERSLint, but you can set up ESLint to use Prettier for auto-fixing. See https://intellij-support.jetbrains.com/hc/en-us/community/posts/360006688800/comments/360000988340

0

Please sign in to leave a comment.