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

eslint-config-prettier runs prettier on every file being linted #93

Open
petetnt opened this issue Nov 14, 2023 · 0 comments
Open

eslint-config-prettier runs prettier on every file being linted #93

petetnt opened this issue Nov 14, 2023 · 0 comments

Comments

@petetnt
Copy link
Member

petetnt commented Nov 14, 2023

https://typescript-eslint.io/linting/troubleshooting/performance-troubleshooting/#eslint-plugin-prettier

This plugin surfaces Prettier formatting problems at lint time, helping to ensure your code is always formatted. However this comes at a quite a large cost - in order to figure out if there is a difference, it has to do a Prettier format on every file being linted. This means that each file will be parsed twice - once by ESLint, and once by Prettier. This can add up for large codebases.

Instead of using this plugin, we recommend using Prettier's --check flag to detect if a file has not been correctly formatted.

On larger codebases, this definitely seems noticeable.

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

No branches or pull requests

1 participant