-
Notifications
You must be signed in to change notification settings - Fork 236
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
feat: import formatting rules from eslint-plugin-jest-formatting
#1563
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
025ebb2
to
e8ea5eb
Compare
d8b49bd
to
f987cb6
Compare
Note that for now I've focused on integrating the rules into our plugin with as minimal changes as possible - there's a few things I'd like to explore refactoring, but I've not found anything actually horribly broken so I think it's better to leave such refactors for a follow-up (or at least for after confirming we want to land this); likewise for adding any new configs. |
066223d
to
b6d8241
Compare
b6d8241
to
df85861
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haven't looked through the code, but in general I'm happy to see this land 🙂
(as long as the maintainers of the existing plugin are OK with it)
@dangreenisrael are you happy for this to happen? |
@G-Rath I can't really speak for @dangreenisrael, but I'm a contributor on the repo in question and I think the best place for this plugin is probably within the Jest community org now that @SimenB has relaxed the rules around style plugins a bit. Assuming Dan wants to donate the package, we'd want to put some kind of notice on the current repo/package to say that the plugin has been adopted by the Jest community. Are there any other changes on Dan's side that would need to happen? I think the current plugin is included in some packages that bundle several plugins together, so we might have to track those down. |
Deprecating on npm is probably enough as people installing would get a warning. Which might be a bit heavy handed of course 😅 |
@G-Rath was this PR abandoned? |
@lasersio2 nope, just waiting to hear back from the owner :) |
3be1e0f
to
3a9f997
Compare
3a9f997
to
78ff8a4
Compare
78ff8a4
to
c86044d
Compare
Ok so to recap some high level points before this lands:
The two notable things for end users are probably:
The rule configuration to use for
I'll aim to do some followup documentation updates after this is landed probably in the form of a light migration guide which'll cover this. |
Personally, I very much prefer extending the |
a separate config seems fine, but without |
Wouldn't that just be adding the rule |
My understanding is that rule is more aggressive, which is why it's enabled by the
I mean, I figured it wasn't a big deal because it's only a few lines, shared config etc, and like we've got a bunch of cool rules that are not enabled in our configs that you would be missing out on if you only used configs, but I don't mind shipping a config since someone actually asked for it 😄 (the practical reason I didn't include it by default is once we have a config, it's a breaking change to do anything with it - so these days I prefer to do as little as possible and then add stuff when people ask for it) I'll do a dedicated PR for the config so it can have its own changelog, and that'll give us a version where we can double smoketest that the rules are working fine before we officially start recommending them in our docs too - I'm thinking I'll just name the config |
Yeah, we often enable several rules in addition to shipped recommended configs. However, many times the presets are just fine and our own config is clearer and easier to maintain when using them. Many thanks for adding it. 🙇 |
# [28.8.0](v28.7.0...v28.8.0) (2024-08-07) ### Features * import formatting rules from `eslint-plugin-jest-formatting` ([#1563](#1563)) ([74078ee](74078ee))
🎉 This issue has been resolved in version 28.8.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This explores what it would be like to import the formatting rules from
eslint-plugin-jest-formatting
- I'm a big fan of these rules and have always thought it would make sense to include them as I don't think this is a particularly controversial style.Related: dangreenisrael/eslint-plugin-jest-formatting#122
Resolves #1301
Resolves #1251
Resolves #113
Resolves #17