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

fix(no-deprecated-functions): mark jest as an optional peer dependency #970

Merged
merged 2 commits into from
Nov 4, 2021

Conversation

jdanil
Copy link
Contributor

@jdanil jdanil commented Oct 30, 2021

jest/no-deprecated-functions requires jest if a version isn't explicitly set in the config to automatically detect it from jest's package.json manifest file.

As jest isn't declared as a dependency of eslint-plugin-jest, stricter node linkers like pnp and pnpm throw errors when trying to run the rule.

I opted to add it as an optional peer dependency as some consumers may explicitly declare their jest version in their eslint config, may not be using this specific rule, or eslint-plugin-jest may be included in a shareable eslint config that runs on some packages that may not include jest tests.

@erwindetesters
Copy link

Great to see a fix for this @jdanil as we are running into this with our shareable setup 👍

@G-Rath G-Rath changed the title fix(no-deprecated-functions): add missing jest peer dependency fix(no-deprecated-functions): mark jest as an optional peer dependency Nov 4, 2021
Copy link
Collaborator

@G-Rath G-Rath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@G-Rath G-Rath merged commit f468752 into jest-community:main Nov 4, 2021
github-actions bot pushed a commit that referenced this pull request Nov 4, 2021
## [25.2.3](v25.2.2...v25.2.3) (2021-11-04)

### Bug Fixes

* **no-deprecated-functions:** mark jest as an optional peer dependency ([#970](#970)) ([f468752](f468752))
@github-actions
Copy link

github-actions bot commented Nov 4, 2021

🎉 This PR is included in version 25.2.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jdanil jdanil deleted the fix/missing-jest-peer-dependency branch November 4, 2021 23:41
@jdanil
Copy link
Contributor Author

jdanil commented Nov 4, 2021

Thanks for updating the lockfile! Forgot the yarn install 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants