question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Mansehejcommented, Jun 4, 2020

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

0reactions
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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found