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

Stdin input throwing unpretty error when config is missing #7213

Closed
nzakas opened this issue Sep 22, 2016 · 1 comment
Closed

Stdin input throwing unpretty error when config is missing #7213

nzakas opened this issue Sep 22, 2016 · 1 comment
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

Comments

@nzakas
Copy link
Member

nzakas commented Sep 22, 2016

(Split out from #7144)

Tell us about your environment

  • ESLint Version: master
  • Node Version: 4.4.2
  • npm Version: 2.15.0

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

Please show your full configuration: n/a

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

Ran this in the command line in a directory without a configuration file.

$ echo 'var x = "y";' | eslint --stdin

What did you expect to happen?

I expected to see the pretty message telling me there is no config file.

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

I get an ugly message telling me a config file is missing:

No ESLint configuration found.
Error: No ESLint configuration found.
    at getLocalConfig (/Users/cowboyd/.nvm/versions/node/v4.2.3/lib/node_modules/eslint/lib/config.js:162:35)
    at Config.getConfig (/Users/cowboyd/.nvm/versions/node/v4.2.3/lib/node_modules/eslint/lib/config.js:256:22)
    at processText (/Users/cowboyd/.nvm/versions/node/v4.2.3/lib/node_modules/eslint/lib/cli-engine.js:222:33)
    at CLIEngine.executeOnText (/Users/cowboyd/.nvm/versions/node/v4.2.3/lib/node_modules/eslint/lib/cli-engine.js:749:26)
    at Object.execute (/Users/cowboyd/.nvm/versions/node/v4.2.3/lib/node_modules/eslint/lib/cli.js:174:42)
    at /Users/cowboyd/.nvm/versions/node/v4.2.3/lib/node_modules/eslint/bin/eslint.js:57:36
    at ConcatStream.<anonymous> (/Users/cowboyd/.nvm/versions/node/v4.2.3/lib/node_modules/eslint/node_modules/concat-stream/index.js:36:43)
    at emitNone (events.js:72:20)
    at ConcatStream.emit (events.js:166:7)
    at finishMaybe (/Users/cowboyd/.nvm/versions/node/v4.2.3/lib/node_modules/eslint/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:475:14)
@nzakas nzakas 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 Sep 22, 2016
@not-an-aardvark
Copy link
Member

Working on this.

not-an-aardvark added a commit to not-an-aardvark/eslint that referenced this issue Sep 23, 2016
not-an-aardvark added a commit to not-an-aardvark/eslint that referenced this issue Sep 23, 2016
not-an-aardvark added a commit to not-an-aardvark/eslint that referenced this issue Sep 23, 2016
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@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 Feb 6, 2018
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
Projects
None yet
Development

No branches or pull requests

2 participants