[js] Upgrade ESLint from v8 to v9 for subfolder /js/ - #26419
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades ESLint from version 8 to version 9 for the /js/ folder, migrating from the legacy .eslintrc.js configuration format to the new flat config format (eslint.config.mjs). The upgrade also includes updates to related ESLint plugins and adapts the codebase to comply with new linting rules.
- Migrated ESLint configuration from
.eslintrc.jsto flat config formateslint.config.mjs - Upgraded ESLint and related plugins to their latest versions
- Replaced deprecated
expect().to.be.true/falseassertions with explicit error throwing - Removed unnecessary ESLint disable comments that are no longer needed
Reviewed Changes
Copilot reviewed 28 out of 30 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| js/package.json | Updated ESLint and plugin dependencies to v9-compatible versions |
| js/eslint.config.mjs | New flat config format with equivalent rule configuration |
| js/.eslintrc.js | Removed legacy configuration file |
| js/web/test/unittests/opset.ts | Replaced expect assertion with explicit error throw |
| js/web/test/test-runner.ts | Replaced expect assertion with explicit error throw |
| js/web/test/test-types.ts | Removed no-namespace disable comment |
| js/node/test/unittests/lib/tensor.ts | Refactored ternary expressions to if/else blocks |
| js/react_native/e2e/src/App.tsx | Updated deprecated ban-types to no-empty-object-type |
| Multiple files | Removed unnecessary eslint-disable comments and unused catch variables |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Guenther Schmuelling (guschmue)
approved these changes
Oct 28, 2025
Naomi Ovadia (naomiOvad)
pushed a commit
to naomiOvad/onnxruntime
that referenced
this pull request
Nov 2, 2025
### Description [js] Upgrade ESLint from v8 to v9 for subfolder /js/ ### Motivation and Context
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
[js] Upgrade ESLint from v8 to v9 for subfolder /js/
Motivation and Context