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

no-try-expect is still part of the jest/recommended #678

Closed
alexilyaev opened this issue Sep 26, 2020 · 3 comments
Closed

no-try-expect is still part of the jest/recommended #678

alexilyaev opened this issue Sep 26, 2020 · 3 comments

Comments

@alexilyaev
Copy link

To continue #648

@G-Rath Looks like no-try-expect is still in the recommended list (v24 major was released recently).

I got here because I'm using eslint-find-rules to find deprecated rules in my configs and it failed for jest/recommended.

I'm assuming the recommended property needs to be removed from the rule file.
But also thinking if this can be prevented in the future.
Although if we deprecate a rule and still keep it in the jest/recommended, then I'm not sure how.

Any way, here's how I ran eslint-find-rules:

// .eslintrc.js
module.exports = {
  plugins: ['jest'],
  extends: ['plugin:jest/recommended'],
};
$ npx eslint-find-rules --deprecated jest-bug.js

deprecated rules

jest/no-try-expect
@G-Rath
Copy link
Collaborator

G-Rath commented Sep 26, 2020

@alexilyaev this is because we forgot to remove the deprecated rules in the new major.

We can't change what's in recommended without a new major, so while we addresses this for all when it was reported, we can't do anything in this case without technically breaking semver.

See #663 for related discussion.

@alexilyaev
Copy link
Author

I understand that.
But ideally there would be an automated process to check for such a thing, to alleviate the need to not forget to remove rules from all and recommended.
Or at least a formal manual step-by-step guide for major releases, noting the necessary things to go through.

@G-Rath
Copy link
Collaborator

G-Rath commented Sep 26, 2020

Thanks for understanding.

I'm going to close this for now since we've got #661 already prepared for the next major :)

@G-Rath G-Rath closed this as completed Sep 26, 2020
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

2 participants