A
A
Alexander2020-10-13 10:06:19
Linter
Alexander, 2020-10-13 10:06:19

How to force prettier to follow eslint rules?

There is an eslint configuration from the company. You need to add prettier to format according to it, and he does it in his own way

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-10-20
@ris_ok

I did this by adding a .prettier file and a few tweaks to it. But it did not help, there was a conflict in the small settings.
Disabled formatOnSave for prettier, left for eslint.

"editor.codeActionsOnSave": {
    "source.fixAll": false,
    "source.fixAll.eslint": true,
    "source.fixAll.prettier": false
  },

Flow is like this:
I start prettier ALT + F with my hands (correct formatting).
Then I save and eslint fixes all the problems

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question