Bug: run "yarn run eslint --init" returns "Oops! Something went wrong!"
See original GitHub issueEnvironment
Node version: v.12.22.8 npm version: v6.14.15 Local ESLint version: v8.5.0 Global ESLint version: N/A Operating System: macOS
What parser are you using?
Default (Espree)
What did you do?
Configuration
<!-- Paste your configuration here -->
How would you like to use ESLint? · style
✔ What type of modules does your project use? · commonjs
✔ Which framework does your project use? · none
✔ Does your project use TypeScript? · No / Yes
✔ Where does your code run? · node✔ How would you like to define a style for your project? · guide
✔ Which style guide do you want to follow? · airbnb
✔ What format do you want your config file to be in? · JavaScript
Checking peerDependencies of eslint-config-airbnb-base@latest
The config that you've selected requires the following dependencies:
eslint-config-airbnb-base@latest eslint@^7.32.0 || ^8.2.0 eslint-plugin-import@^2.25.2
✔ Would you like to install them now with npm? · No / Yes
After choose js config file, select aribnb and not install right now, eslint throw an error with:
Oops! Something went wrong! :(
ESLint: 8.5.0
ESLint couldn't find the config "airbnb-base" to extend from. Please check that the name of the config is correct.
The config "airbnb-base" was referenced from the config file in "".
If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
And if I choose yarm or json config file, it works fine
What did you expect to happen?
There is no error
What actually happened?
I get “Oops! Something went wrong!”
Participation
- I am willing to submit a pull request for this issue.
Additional comments
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to fix eslint configuration? - node.js - Stack Overflow
I have node.js project, and started with eslint configuration. There is .eslintrc.json { ...
Read more >eslint/eslint - Gitter
I am having an issue with ESLint while deploying my react app to Heroku. I am getting this error "Oops! Something went wrong!...
Read more >eslint | Yarn - Package Manager
A bug fix in a rule that results in ESLint reporting fewer linting errors. A bug fix to the CLI or core (including...
Read more >eslint couldn't find the config "react-app" to extend from
npx eslint --init # or $ yarn run eslint --init ... Oops! Something went wrong! :( ESLint: 7.32.0 ESLint couldn't find the config...
Read more >Find and fix problems in your JavaScript code - ESLint ...
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
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 Free
Top 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
@lvqq thanks for the feedback! I think we can just skip the step when users choose not to install the deps, will try to fix it in the new package.
@aladdin-add I use
npm init @eslint/create-config
and get the same error message. Worsely, it comes up with anUnhandledPromiseRejectionWarning: Unhandled promise rejection
. Maybe you should add an process’s unhandledRejection event listener. I can’t find the source code in github. That’s all the information I can give you.