Is using Prettier to format code bad.
Neovim and prettier
Videos
Recently joined a agency as an Contract React developer. I was assigned a task to edit some inline Scss code.
Being a Prettier user I formatted the code, made the necessary changes and submitted a pull request.
Next day the senior developer reviewed my code and asked me to stop using Prettier and assigned me a task to change back the Scss code manually to inline Scss.
When I asked why should I not use prettier to format code. He said it's bad and time consuming and other team members started telling me a story how one time prettier wasn't working and started throwing errors.
That's why they never use it.
I wanted to say that It was showing error because you were doing something wrong.
Just because you once had an bad experience doesn't mean it's bad.
Plus they use one big single Scss file for the whole project.
When I question it too and asked them to use separate files and how it can effect the performance.
One team member answered it doesn't matter, how they don't care about the performance and I should be open minded and learn from them. The boss has 18 years of experience.
What should I learn why not to follow good practices!
» npm install prettier
Neovim and prettier is quite complicated story for me. Let's start that officially prettier recommends not to use prettier together with linter (https://prettier.io/docs/integrating-with-linters) and that makes everything more complicated (while eslint and prettier integration is quite OK, especially with eslint LSP). Now if want to use prettier separately official prettier page https://prettier.io/docs/vim offers either outdated options or the ones I don't want to use. null-ls was quite option until it was discontinued. Lastly I was using prettier via conform.nvim together with prettierd.
However I felt that there should be better way. Now I don't have time to implement that properly, but that's a task I could give to AI (opencode + sonnet 4.5). Here is result: prettier LSP https://github.com/daliusd/prettier-lsp . It works as fast as prettierd and does not need any extra plugins. Most probably it can be improved, but it is quite fun what you can do in 2 hours if all you have is idea.