[Snyk] Security upgrade eslint from 7.32.0 to 9.26.0#460
[Snyk] Security upgrade eslint from 7.32.0 to 9.26.0#460
Conversation
The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-ESLINT-15102420
Summary of ChangesHello @rennokki, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request, automatically generated by Snyk, addresses a critical security vulnerability within the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request, automatically generated by Snyk, upgrades eslint from version 7 to 9 to fix a security vulnerability. While this is a necessary update, it is incomplete and will cause your CI/CD pipeline to fail. The upgrade to ESLint v9 is a major version bump with breaking changes, and it requires corresponding major version upgrades for @typescript-eslint/parser and @typescript-eslint/eslint-plugin. I've left a critical comment detailing the required additional dependency updates to ensure your linting setup continues to work correctly.
| "@typescript-eslint/eslint-plugin": "^4.33.0", | ||
| "@typescript-eslint/parser": "^4.31.1", | ||
| "eslint": "^7.5.0", | ||
| "eslint": "^9.26.0", |
There was a problem hiding this comment.
Upgrading eslint to a new major version (v9) introduces breaking changes. The current versions of @typescript-eslint/parser (^4.31.1 on line 41) and @typescript-eslint/eslint-plugin (^4.33.0 on line 40) are not compatible with ESLint v9. This will cause the lint script to fail.
To resolve this, you must also upgrade these packages to a version compatible with ESLint v9. As of now, this requires using v8.x of the @typescript-eslint packages, which are currently in an alpha state.
You will need to update your dependencies to use these alpha versions, for example:
"@typescript-eslint/eslint-plugin": "^8.0.0-alpha.35",
"@typescript-eslint/parser": "^8.0.0-alpha.35",Please be aware of the potential instability of using alpha releases. You may also need to update your ESLint configuration file due to breaking changes in these packages.
There was a problem hiding this comment.
Pull request overview
This PR attempts to fix a security vulnerability (Uncontrolled Recursion, SNYK-JS-ESLINT-15102420) by upgrading ESLint from version 7.32.0 to 9.26.0. However, this is an incomplete upgrade that will break the project's linting functionality and CI pipeline.
Changes:
- Upgrades eslint from ^7.5.0 to ^9.26.0 in package.json devDependencies
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@typescript-eslint/eslint-plugin": "^4.33.0", | ||
| "@typescript-eslint/parser": "^4.31.1", | ||
| "eslint": "^7.5.0", | ||
| "eslint": "^9.26.0", |
There was a problem hiding this comment.
Upgrading ESLint from version 7 to version 9 is a major breaking change that requires updating multiple dependencies and configuration files. The current TypeScript ESLint packages (@typescript-eslint/eslint-plugin@4.33.0 and @typescript-eslint/parser@4.31.1) are incompatible with ESLint 9.x, which requires @typescript-eslint version 8 or later. Additionally, ESLint 9.x uses a new flat config format (eslint.config.js) instead of the old .eslintrc.js format currently used in this project. This upgrade will break the linting process and CI pipeline. To properly upgrade to ESLint 9, you need to also upgrade the TypeScript ESLint packages and migrate the configuration file to the new flat config format.
| "eslint": "^9.26.0", | |
| "eslint": "^7.32.0", |
Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.
Snyk changed the following file(s):
package.jsonVulnerabilities that will be fixed with an upgrade:
SNYK-JS-ESLINT-15102420
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic
Learn how to fix vulnerabilities with free interactive lessons:
🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.