Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does anyone know if it is still the best solution to prettify code with ESLint config base? #8

Open
dvakatsiienko opened this issue Mar 7, 2021 · 6 comments
Labels
question Further information is requested

Comments

@dvakatsiienko
Copy link

First of all @rohit-gohri thanks for working solution, I don't know how would I write code without it :)
But! The things is the current mechanism works somewhat slow on my maching, and the «two-step-formatting» process is visible to my eyes...I wonder if there is more native approach to achieve prettier to consider ESLint rules?

@rohit-gohri
Copy link
Owner

I have also noticed slowness on some codebases, it is possible this is due to Prettier extension (prettier/prettier-vscode#1333). Could you try installing the beta release of vscode-prettier mentioned here: prettier/prettier-vscode#1333 (comment). If it does not fix it then the problem could be with my extension definitely.

A more native way would be to use code action directly from prettier plugin (feature request here prettier/prettier-vscode#1555)

@rohit-gohri
Copy link
Owner

There is also https://www.npmjs.com/package/prettier-eslint but I could never get it to work properly with VSCode, only through command line.

@rohit-gohri rohit-gohri added the question Further information is requested label Mar 8, 2021
@dvakatsiienko
Copy link
Author

@rohit-gohri I've found a really good VSCode extension created by @idahogurl, but it requires specific versions of dependencies installed (old ones):

And even after installing those still struggling to setup all the parts correctly so still can't manage to get it to work...
Looking for a solution....

@rohit-gohri
Copy link
Owner

I couldn't get that to work either, that's why I created this repo/extension. I would suggest you try the prettier beta extension mentioned above with my extension.

@dvakatsiienko
Copy link
Author

@rohit-gohri Yes, I've tried the beta. The effect seems to be the same — it formats but does not takes into account ESLint config.

@KuSh
Copy link

KuSh commented Oct 22, 2024

There is also https://www.npmjs.com/package/prettier-eslint but I could never get it to work properly with VSCode, only through command line.

There's a vscode extension that use exactly that : https://github.com/idahogurl/vs-code-prettier-eslint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants