Closed kieranhall closed 7 months ago
I was already happy!
But jokes aside: linters vs formatters is not an argument as they serve a different purpose.
On this bit you know my opinion: Prettier is a better formatter, but is not configurable and very opinionated, so I prefer to stick to eslint as a formatter and tweak my rules based on the needs (preferences, learning) of the team I have.
On the same matter I don't understand yours (and @ZER0's) will of following "the community" which is the most ethereal concept to me. I see only boring trends.
Having said that: if everyone feels the need to use prettier, let's use prettier.
The thing that matters the most to me is that everyone understands the importance of having a linter, why, and how it's different from a formatter.
On the same matter I don't understand yours (and @ZER0's) will of following "the community" which is the most ethereal concept to me. I see only boring trends.
I think the only reason is because the repos are (or soon will be) public, and we actively want to attract people to contribute. If it wasn't for this reason, I would not mind sticking with the approach we have now.
The thing that matters the most to me is that everyone understands the importance of having a linter, why, and how it's different from a formatter.
I think everyone should understand this difference and I think we will largely carry on with using it as is. I'm a fan of having strong linting rules (also see my other open issues).
@ZER0 has some ideas about making the configurations more granular, which he can perhaps elaborate on here?
Just adding the announcement news that eslint will deprecate formatting rules. I think this news signals an ideal moment to separate linting and formatting.
I propose that when we upgrade eslint to >=8.5.3
we take care of the formatting topic by adding prettier to all dusk projects using this configuration.
One thing to consider: do we want to make prettier a peerDependency
for this configuration?
When picking up this issue, we should consider also adding https://www.npmjs.com/package/prettier-plugin-packagejson.
The wider community has adopted Prettier and, without going into the the linters vs formatters argument, I think we should fall in line with what's generally expected by the broader JS development community.
If we add eslint-config-prettier, we can disable the rules that interfere with Prettier, allowing both linting and formatting to co-exist and everyone is happy. Right? Right? 😅