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

Projects
None yet
4 participants
@not-an-aardvark
Copy link
Member

commented Jun 22, 2019

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.

@platinumazure
Copy link
Member

left a comment

LGTM, thanks!

@mysticatea
Copy link
Member

left a comment

LGTM, thank you!

@not-an-aardvark not-an-aardvark merged commit 056c2aa into master Jun 25, 2019

9 checks passed

commit-message Commit message follows guidelines
Details
continuous-integration Build #20190622.9 succeeded
Details
continuous-integration (Test on Node.js 10 (Linux)) Test on Node.js 10 (Linux) succeeded
Details
continuous-integration (Test on Node.js 12 (Linux)) Test on Node.js 12 (Linux) succeeded
Details
continuous-integration (Test on Node.js 12 (Windows)) Test on Node.js 12 (Windows) succeeded
Details
continuous-integration (Test on Node.js 12 (macOS)) Test on Node.js 12 (macOS) succeeded
Details
continuous-integration (Test on Node.js 8 (Linux)) Test on Node.js 8 (Linux) succeeded
Details
licence/cla Contributor License Agreement is signed.
Details
release-monitor This change is semver-patch
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.