`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:
- Created 7 years ago
- Comments:8 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, please forgive me, I misread your initial post.
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), orpublic
(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.
@462960 An actual folder with JavaScript files.