Replace dependency babel-eslint with @babel/eslint-parser ^7.11.0#5459
Replace dependency babel-eslint with @babel/eslint-parser ^7.11.0#5459renovate[bot] wants to merge 1 commit into
Conversation
|
553e719 to
246b35f
Compare
246b35f to
6eeeb8d
Compare
ad3a488 to
4afc640
Compare
| "axios-mock-adapter": "^1.8.1", | ||
| "babel-core": "^6.24.1", | ||
| "babel-eslint": "^10.1.0", | ||
| "@babel/eslint-parser": "^7.11.0", |
There was a problem hiding this comment.
Bug: Replacing babel-eslint with @babel/eslint-parser will cause the linting step to fail because a Babel config file is required by default but is not present.
Severity: HIGH
Suggested Fix
Add parserOptions: { requireConfigFile: false } to the .eslintrc file. This will instruct @babel/eslint-parser not to look for a Babel configuration file, resolving the linting failure.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L20
Potential issue: The project updates the ESLint parser from `babel-eslint` to
`@babel/eslint-parser`. The new parser, `@babel/eslint-parser`, defaults its
`requireConfigFile` option to `true`, meaning it requires a Babel configuration file
(like `.babelrc`) to be present. Since this project lacks such a file and does not
override this setting in its `.eslintrc` `parserOptions`, the `npm run lint` command
will fail. This will cause the CI build to fail, preventing the PR from being merged or
deployed.
Did we get this right? 👍 / 👎 to inform future reviews.
7dbb366 to
f291a35
Compare
| "axios-mock-adapter": "^1.8.1", | ||
| "babel-core": "^6.24.1", | ||
| "babel-eslint": "^10.1.0", | ||
| "@babel/eslint-parser": "^7.11.0", |
There was a problem hiding this comment.
Bug: The new @babel/eslint-parser requires Babel 7, but the project's configuration and dependencies are still on Babel 6, which will cause the linting process to fail.
Severity: CRITICAL
Suggested Fix
To resolve the incompatibility, either upgrade the entire Babel ecosystem (core, plugins, presets) to version 7 to match the new parser, or revert to using babel-eslint which is compatible with the existing Babel 6 setup. A full upgrade would involve adding @babel/core and replacing babel-* packages with their @babel/* equivalents.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L20
Potential issue: The project's dependencies and configuration are based on Babel 6,
including `babel-core` and various plugins/presets. This pull request introduces
`@babel/eslint-parser`, a package that requires Babel 7 (`@babel/core@>=7.2.0`). This
creates a major version incompatibility. When the `lint` script runs, ESLint will use
the new parser, which will fail because it cannot work with the existing Babel 6
ecosystem. This will cause the linting process to fail, breaking any build or CI
pipeline that includes it.
75fda22 to
e94fa55
Compare
| "axios-mock-adapter": "^1.8.1", | ||
| "babel-core": "^6.24.1", | ||
| "babel-eslint": "^10.1.0", | ||
| "@babel/eslint-parser": "^7.11.0", |
There was a problem hiding this comment.
Bug: The project uses Babel 6, but the newly added @babel/eslint-parser requires Babel 7, which will cause ESLint parsing to fail.
Severity: MEDIUM
Suggested Fix
To resolve the incompatibility, either upgrade the entire project to Babel 7 (including babel-core and related plugins) or find a version of the ESLint parser that is compatible with the existing Babel 6 setup.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L20
Potential issue: The project's dependencies include `babel-core: ^6.24.1`, indicating it
is configured for Babel 6. The pull request introduces `@babel/eslint-parser: ^7.11.0`,
which is designed to work with Babel 7. This version mismatch will cause ESLint parsing
to fail when it encounters Babel-specific syntax, as the parser will not be compatible
with the project's existing Babel 6 configuration and plugins. This will break the
linting process during development and in CI pipelines.
b29182a to
4006ee8
Compare
4006ee8 to
c86e1e9
Compare
| "axios-mock-adapter": "^1.8.1", | ||
| "babel-core": "^6.24.1", | ||
| "babel-eslint": "^10.1.0", | ||
| "@babel/eslint-parser": "^7.11.0", |
There was a problem hiding this comment.
Bug: The update to ESLint dependencies will break the linting process because eslint-config-mitodl still requires the removed babel-eslint, and the new @babel/eslint-parser is missing its @babel/core peer dependency.
Severity: HIGH
Suggested Fix
To fix the linting failure, add @babel/core as a dev dependency to satisfy the peer dependency requirement of @babel/eslint-parser. Then, override the parser in the local .eslintrc configuration file by setting "parser": "@babel/eslint-parser" to ensure it is used instead of the one specified by eslint-config-mitodl.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L20
Potential issue: The changes in `package.json` will break the ESLint setup. The removal
of the `babel-eslint` package will cause an error because a dependency,
`eslint-config-mitodl`, still requires it. This will lead to a "Cannot find module
'babel-eslint'" error when running the linter. Additionally, the newly added
`@babel/eslint-parser` requires `@babel/core` (version 7) as a peer dependency, which is
not present in the project's dependencies. The project currently uses the older
`babel-core` (version 6). These issues will cause the linting process to fail, blocking
CI/CD pipelines.
823e5ca to
77e20f7
Compare
b7d077b to
72e4564
Compare
d5e9eb4 to
d28d414
Compare
ebc4e14 to
8bc7b6a
Compare
8963465 to
9349b7f
Compare
f36e5fe to
8ca0a91
Compare
8ca0a91 to
c15baf0
Compare
c15baf0 to
422c88f
Compare
This PR contains the following updates:
^10.1.0→^7.11.0This is a special PR that replaces
babel-eslintwith the community suggested minimal stable replacement version.Configuration
📅 Schedule: (in timezone US/Eastern)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.