vscode-format-code-action
vscode-format-code-action copied to clipboard
Does anyone know if it is still the best solution to prettify code with ESLint config base?
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?
I have also noticed slowness on some codebases, it is possible this is due to Prettier extension (https://github.com/prettier/prettier-vscode/issues/1333). Could you try installing the beta release of vscode-prettier mentioned here: https://github.com/prettier/prettier-vscode/issues/1333#issuecomment-791438686. 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 https://github.com/prettier/prettier-vscode/issues/1555)
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 I've found a really good VSCode extension created by @idahogurl, but it requires specific versions of dependencies installed (old ones):
[email protected], [email protected], [email protected]
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....
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.
@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.