Error when upgrading `babel-eslint` to `@babel/eslint-parser`
See original GitHub issuebabel-eslint
is used in the latest ember new https://github.com/ember-cli/ember-new-output/blob/v3.23.0-beta.2/package.json#L27, however, it has moved:
https://babeljs.io/blog/2020/07/13/the-state-of-babel-eslint
module.exports = {
--- parser: "babel-eslint",
+++ parser: "@babel/eslint-parser"
plugins: [
--- "babel"
+++ "@babel
]
};
When I try to replace the default babel-eslint
, this error is thrown:
/home/travis/build/xg-wang/test--babel-eslint-parser/.eslintrc.js
0:0 error Parsing error: No Babel config file detected for /home/travis/build/xg-wang/test--babel-eslint-parser/.eslintrc.js. Either disable config file checking with requireConfigFile: false, or configure Babel so that it can find the config files
repro: https://github.com/xg-wang/test--babel-eslint-parser/commit/5b7df2998811a0dc213bf6f50d95a53cd43c2dff
Issue Analytics
- State:
- Created 3 years ago
- Reactions:14
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Updating babel-eslint to @babel/eslint-parser for React apps
As of March 2020, babel-eslint has been deprecated, and is now @babel/eslint-parser . That doesn't stop it (as of March 2021) being ...
Read more >@babel/eslint-parser - npm
If you have an issue, please first check if it can be reproduced with the default parser and with the latest versions of...
Read more >Problem with babel-esLint: Parsing error: require() of ES Module
This is probably happening because you, like me, were using the old babel parser. Package babel-eslint has been deprecated since March of ...
Read more >Switching from babel-eslint to @babel-eslint - Schalk Neethling
Parsing error : No Babel config file detected for [file].js. Either disable config file checking with requireConfigFile: false, or configure Babel so that...
Read more >ESLint: Parsing error: No Babel config file detected ... - YouTrack
Hello,. Since moving from the deprecated babel-eslint to the recommended @babel/eslint-parser my colleagues using WebStorm and IntelliJ IDEA started getting ...
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
You have to set the config flag
requireConfigFile
:I’d love a PR to the ember-cli blueprint to update to latest for folks if you have the time (no worries if not though!).
I got it running worked after spending some time trying out different options. Hope this helps anyone else getting stuck.
.eslintrc.json (in root project folder):
Empty .babelrc (in root project folder):
.package.json (in root project folder):
VS Code settings.xml (editor configuration: enables auto fix on save + babel parser):