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.

`eslint --init` fails

See original GitHub issue
  • ESLint Version: v3.5.0
  • Node Version: v4.5.0
  • npm Version: 2.15.9

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

Please show your full configuration: --init failed, I have no configuration.

What did you do? Please include the actual source code causing the issue. Well, I typed $ eslint --init in console.

What did you expect to happen? Create a setup a configuration file.

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

$ eslint --init 
? How would you like to configure ESLint? Inspect your JavaScript file(s)
? Which file(s), path(s), or glob(s) should be examined? path
? What format do you want your config file to be in? JavaScript
? Are you using ECMAScript 6 features? Yes
? Are you using ES6 modules? Yes
? Where will your code run? Browser, Node
? Do you use CommonJS? No
? Do you use JSX? No
Determining Config: 0% [------------------------------] 0.0s elapsed, eta 0.0s 

Automatic Configuration failed.  No files were able to be parsed.
Error: Automatic Configuration failed.  No files were able to be parsed.
    at configureRules (/home/kevin/.local/lib/node_modules/eslint/lib/config/config-initializer.js:142:15)
    at processAnswers (/home/kevin/.local/lib/node_modules/eslint/lib/config/config-initializer.js:254:18)
    at null.completed (/home/kevin/.local/lib/node_modules/eslint/lib/config/config-initializer.js:414:30)
    at PromptUI.onCompletion (/home/kevin/.local/lib/node_modules/eslint/node_modules/inquirer/lib/ui/prompt.js:57:10)
    at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.completed (/home/kevin/.local/lib/node_modules/eslint/node_modules/inquirer/node_modules/rx-lite/rx.lite.js:1550:12)
    at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (/home/kevin/.local/lib/node_modules/eslint/node_modules/inquirer/node_modules/rx-lite/rx.lite.js:1489:14)
    at Subject.Rx.Subject.addProperties.onCompleted (/home/kevin/.local/lib/node_modules/eslint/node_modules/inquirer/node_modules/rx-lite/rx.lite.js:5871:19)
    at Subject.tryCatcher (/home/kevin/.local/lib/node_modules/eslint/node_modules/inquirer/node_modules/rx-lite/rx.lite.js:63:31)
    at AutoDetachObserverPrototype.completed (/home/kevin/.local/lib/node_modules/eslint/node_modules/inquirer/node_modules/rx-lite/rx.lite.js:5796:56)
    at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (/home/kevin/.local/lib/node_modules/eslint/node_modules/inquirer/node_modules/rx-lite/rx.lite.js:1489:14)

I am available for further details. Thanks for the good work.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
platinumazurecommented, Sep 22, 2016

Ah, please forgive me, I misread your initial post.

? Which file(s), path(s), or glob(s) should be examined? path

I think you might be misunderstanding this question. This question isn’t asking whether you prefer to examine files vs paths vs globs, but rather you need to enter all appropriate files, paths, or globs for ESLint to examine. My guess is “path” is being interpreted as a filename or folder, and when ESLint can’t find either, it fails.

What you probably want is either . (current folder plus subfolders), **/*.js (glob pattern that matches all JavaScript files in current folder and subfolders, similar to . but more explicit), or public (for example, if you don’t want the Gruntfile or app.js to influence the generated ESLint config).

Give that a try and let me know if that works better for you.

0reactions
KINFOOcommented, May 29, 2017

@462960 An actual folder with JavaScript files.

Read more comments on GitHub >

github_iconTop Results From Across the Web

`eslint --init` failed · Issue #11862 - GitHub
Tell us about your environment ESLint Version: 5.16.0 Node Version: v10.16.0 npm Version: 6.9.0 What did you ... eslint --init failed #11862.
Read more >
How to fix 'eslint --init fails'? - Stack Overflow
This is for Mac, node v10.10.0,npm 6.4.1 eslint --init ? How would you like to use ESLint? To check syntax, find problems, and...
Read more >
Command Line Interface - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
ESLint Error at npm start --open - Material Design for Bootstrap
When everything else fails, you may always try go initialize the ESlint config file yourself with eslint --init in either the root of...
Read more >
eslint/eslint - Gitter
One is in my terminal, I'm just running the eslint --init command and failing, as I mentioned. The other is that I have...
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