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

Warn when multiple configs are found #10124

Closed
SimenB opened this issue Jun 4, 2020 · 10 comments · Fixed by #11922
Closed

Warn when multiple configs are found #10124

SimenB opened this issue Jun 4, 2020 · 10 comments · Fixed by #11922

Comments

@SimenB
Copy link
Member

SimenB commented Jun 4, 2020

🚀 Feature Proposal

From #10123.

When we find a config file, we should also check if there is a jest entry in any sibling package.json and print a warning that it is ignored.

If using --config we should not warn.

Motivation

Helps the user have correct and consistent configuration and helps when trying to debug why config is not applied.

Example

$ jest
● Multiple configurations found:

  Jest will use `path/to/jest.config.js` for configuration, but Jest also
  found configuration in `path/to/package.json`. Delete the `"jest"` key
  in that file to silence this warning, or delete the `jest.config.js` file
  to use the configuration from `package.json`.

  Configuration Documentation:
  https://jestjs.io/docs/en/configuration.html
@Mansehej
Copy link

Mansehej commented Jun 4, 2020

Hey,
Mind if I give it a try as my first issue?

@thymikee
Copy link
Collaborator

thymikee commented Jun 5, 2020

@Mansehej go for it!

@AndresContreras96
Copy link

AndresContreras96 commented Jun 19, 2020

Hello @Mansehej are you keep working on this issue?

@Mansehej
Copy link

Hey @AndresContreras96, I am indeed. I have, infact, got it working, I'm trying to figure out writing tests for it.

@mgm793
Copy link

mgm793 commented Nov 9, 2020

Hey, I create a PR to solve it! #10798

@Adomyanmarcitizen
Copy link

How to do at I really don't understand.

@hallelshohat
Copy link

can I Work on it?

@jankaifer
Copy link
Contributor

jankaifer commented Oct 2, 2021

I'm working on it.

@SimenB
Copy link
Member Author

SimenB commented Oct 8, 2021

@github-actions
Copy link

github-actions bot commented Nov 8, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants