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
Format using a formatter instead of ESLint formatting rules #1949
Comments
Or use https://eslint.style/ |
https://eslint.style is a fork of the style rules that are deprecated in ESLint and typescript-eslint. I find this part from the deprecation blog post important:
The architecture of ESLint isn't adequate for formatting. |
It's been working this far, step one would be to use eslint.style Going down the route of dprint will be extremely hard without causing lots of disruption. Believe me, I have tried |
The disruption to the users amounts to having to accept the automatic formatting changes, I suppose? |
A couple of things:
|
IMO one of the strengths of It is my opinion that we need a lot more analysis of the problem than this issue provides to make a good decision here, but that the default decisions should be to use the existing working setup as long as possible. I don't have a strong opinion on dprint, but I am really uncomfortable choosing a native dep for this. Additionally it looks like that library is pretty generic, which likely means there will be a lot of work to use and might never really fully satisfy the needs. |
What has happened that forces us to make a change?ESLint 9 won't ship with style rules. Why is that relevant?Well, we want to support ESLint 9 eventually. How can we support ESLint 9?
Which is the least disruptive solution?Using the very same rules as now but from an imported package Would it be better to use a formatter?Maybe, but that feels like out of scope of what standard is. Eg many are using standard side by side with Prettier already. |
Yeah this is great! Honestly I feel like this is a great foundation for a conversation about how to move forward. Good problem statement and doesn't jump to a conclusion or a specific tool recommendation. @mightyiam, maybe we could reframe the discussion less around choosing a specific solution first and help fill in more details on what our options are and the pros/cons of them? |
Why is reformatting our users' code such a big deal? |
I am not sure I understand this question. Can you provide more details on what you are trying to get at with this question? |
Exactly! Many users are using Prettier and Standard side by side, so what's the point of including ESLint formatting rules, if it's indeed something that should be out of the scope of standard. |
Would be best that Standard doesn't include any formatter, and only do the linting phase with ESLint. |
@theoludwig That would require an additional formatter for feature parity I agree with @wesleytodd on this:
If you want 100% formatting – add a formatter (and likewise, if you want 100% linting, go with a custom extension of eslint-config-standard)
|
I think the ideal vision of the standard project was to stop arguing about linting and formatting in every project, to centralize that discussion, and then keep true to that decision for stability. Dropping formatting is, IMO, against that vision. To circle it back to governance though, if there was governance in place we could have these discussions in an abstract way and then apply the "vision" to this issue. We don't have first principals documented, so we hare fighting out the "to format or not" discussion without agreement on the high level goals of the project. I would really like to formalize #1948 before any decisions like this are made personally. |
I think ESLint 9 might be safe enough, according to the ESLint blog: |
ESLint formatting rules are going away. Use dprint, instead.
The text was updated successfully, but these errors were encountered: