Warn when multiple configs are found
See original GitHub issue🚀 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
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Git submodule warning 'multiple configurations found'
Git stores per-submodule configuration data in files named .gitmodules . This file has the same layout as .git/config , but unlike ...
Read more >Configuring Jest
The file will be discovered automatically, if it is named jest.config.js|ts|mjs|cjs|json . You can use --config flag to pass an explicit path to...
Read more >Configuration Files - ESLint - Pluggable JavaScript Linter
If there are multiple configuration files in the same directory, ESLint only uses one. The priority order is as follows: .eslintrc.js .eslintrc.cjs ...
Read more >The mypy configuration file - mypy 0.991 documentation
Multiple paths are always separated with a : or , regardless of the platform. User home directory and environment variables will be expanded....
Read more >Configuration - Prometheus.io
[ receiver: <string> ] # The labels by which incoming alerts are grouped together. For example, # multiple alerts coming in for cluster=A...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, Mind if I give it a try as my first issue?
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.