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: use prettier for formatting #6096
base: master
Are you sure you want to change the base?
Conversation
5cab70a
to
77fcdcb
Compare
77fcdcb
to
54ead9f
Compare
I understand prettier is a neat tool to remove discussions about the "proper" coding style, but I think the rules we have put us in a nice place already, being the right balance between consistency and flexibility. In that way, I don't believe prettier offers us enough value here that it is worth the change. The deprecation of the formatting eslint rules is very disappointing, but unless I'm mistaken it's not an immediate issue today and, if push comes to shove, I'd actually write my own rules than forego a coding style I grew accustomed to. I understand if that looks like an eccentricity, but that's one I feel fairly strongly about... |
I disagree, whenever I write code in this repo I either manually nudge the code to get it to match the rest of the file, which is a waste of time, or I force format it with prettier. I don't care what formatting style we use as long as it's consistent throughout the codebase and our current setup doesn't do that. Would you be more open to something like https://dprint.dev/ which lets you configure more?
It's not but it's another sign that maybe using ESLint for formatting isn't a good idea.
That seems a bit extreme, presumably you'd get used to this style and eventually realize you don't actually care.
Strongly enough to veto a vote on it? |
What's an example of inconsistency you have in mind, so we have a baseline?
Perhaps; I don't want drastic changes, and don't want width-control rules. So it depends on what set of changes you have in mind. |
I feel that a formatter integrated into the repo is very helpful for occasional contributors. |
If switching to prettier, we should consider using config closest to existing style to reduce diff. Another way to incrementally switch to prettier is to only enable it for TypeScript files to start with, and later including other files - like markdown. Although eslint-stylistic is community supported, there are passionate folks who're committed to maintaining it. Many projects from Vue ecosystem are going to continue using ESLint Stylistic rules. Can yarn stick to ESLint for formatting, to avoid large diff and adding another additional dependencies? |
What's the problem this PR addresses?
How did you fix it?
eslint-config-prettier
to the eslint config.Checklist