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

chore: remove unneeded prettier eslint plugin #437

Closed

Conversation

mikavilpas
Copy link

Issue

Prettier rules seem to be enforced both via prettier itself, and in addition by eslint via eslint-plugin-prettier.

Prettier docs state the following recommendation:

When searching for both Prettier and your linter on the Internet you’ll probably find more related
projects. These are generally not recommended[...]

By running Prettier inside your linters, you didn’t have to set up any new infrastructure and you
could re-use your editor integrations for the linters.
But these days you can run prettier --check . and most editors have Prettier support.

The downsides of those plugins are:

  • You end up with a lot of red squiggly lines in your editor, which gets annoying. Prettier is
    supposed to make you forget about formatting – and not be in your face about it!

https://prettier.io/docs/en/integrating-with-linters.html

Solution

Remove eslint-plugin-prettier from the project, and continue to use prettier as a standalone tool. This removes the red squiggly lines in the editor.

Issue
=====

Prettier rules seem to be enforced both via prettier itself, and in addition by eslint via
eslint-plugin-prettier.

Prettier docs state the following recommendation:

> When searching for both Prettier and your linter on the Internet you’ll probably find more related
> projects. These are generally not recommended[...]
>
> By running Prettier inside your linters, you didn’t have to set up any new infrastructure and you
> could re-use your editor integrations for the linters.
> But these days you can run `prettier --check .` and most editors have Prettier support.
>
> The downsides of those plugins are:
>
> - You end up with a lot of red squiggly lines in your editor, which gets annoying. Prettier is
>   supposed to make you forget about formatting – and not be in your face about it!
>
> https://prettier.io/docs/en/integrating-with-linters.html

Solution
========

Remove eslint-plugin-prettier from the project, and continue to use prettier as a standalone tool.
This removes the red squiggly lines in the editor.
@justinmk
Copy link
Member

justinmk commented Nov 4, 2024

Minimizing dependencies is definitely appreciated.

However in this case I don't understand what problem is being solved. In this project, the prettier rules are also enforced "lint" rules. That's intentional. I don't really give a flip about red squiggles, and I don't understand why that is undesirable anyways--because again, prettier rules are lint rules.

@justinmk justinmk closed this Nov 4, 2024
@mikavilpas
Copy link
Author

Oh, I did not realize that was the case. In my experience, usually prettier is run with an editor plugin, and on the command line in CI, while being run as part of eslint is an older way and nowadays not recommended.

If running as part of eslint is a good fit for this project, I think with the same reasoning #435 can also be closed. It's about some prettier errors that appear when you try to run pretttier on the command line.

@mikavilpas mikavilpas deleted the remove-prettier-eslint-plugin branch November 4, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants