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: improve diagnostics for shareable-config-missing errors #11880

Merged
merged 1 commit into from
Jun 25, 2019

Conversation

not-an-aardvark
Copy link
Member

What is the purpose of this pull request? (put an "X" next to item)

[x] Bug fix

Tell us about your environment

  • ESLint Version: master
  • Node Version: 12.4.0
  • npm Version: 6.9.0

What parser (default, Babel-ESLint, etc.) are you using?

default

Please show your full configuration:

Configuration
module.exports = {
  extends: 'nonexistent-config'
};

What did you do? Please include the actual source code causing the issue.

(Any source code)

What did you expect to happen?

I expected to get an error message saying that nonexistent-config doesn't exist, with a useful indicator for which config was trying to load nonexistent-config.

What actually happened? Please include the actual, raw output from ESLint.

I got the following error message:

ESLint couldn't find the config "nonexistent-config" to extend from. Please check that the name of the config is correct.

This error message makes it difficult to debug the problem if I'm not sure who is trying to load a given missing config.

What changes did you make? (Give an overview)

This updates the missing-shareable-config error message to include more useful diagnostic information about the problem, by mentioning which config tried to load the nonexistent config.

Is there anything you'd like reviewers to focus on?

I'm labelling this as a "bug" because the fix wouldn't have any semver impact (even if reverted), but feel free to comment if you disagree with this categorization.

@not-an-aardvark not-an-aardvark added bug ESLint is working incorrectly core Relates to ESLint's core APIs and features accepted There is consensus among the team that this change meets the criteria for inclusion labels Jun 22, 2019
Copy link
Member

@platinumazure platinumazure left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Member

@mysticatea mysticatea left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@not-an-aardvark not-an-aardvark added the patch candidate This issue may necessitate a patch release in the next few days label Jun 24, 2019
@not-an-aardvark not-an-aardvark merged commit 056c2aa into master Jun 25, 2019
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Dec 23, 2019
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Dec 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly core Relates to ESLint's core APIs and features patch candidate This issue may necessitate a patch release in the next few days
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants