Repository navigation
ROX-37653: Rewrite ESLint config as ECMAScript module - #23503
Open
pedrottimark wants to merge 2 commits into
Open
pedrottimark wants to merge 2 commits into
pedrottimark wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #23503 +/- ##
==========================================
- Coverage 52.01% 51.96% -0.05%
==========================================
Files 2914 2914
Lines 183753 183753
==========================================
- Hits 95574 95495 -79
- Misses 79835 79895 +60
- Partials 8344 8363 +19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
🚀 Build Images ReadyImages are ready for commit d48b862. To use with deploy scripts: export MAIN_IMAGE_TAG=5.1.x-306-gd48b862788 |
Contributor
This branch has not been deployed
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
Problems
ESLint 9 reached End of Life (EOL) status on 2026-07-10
https://eslint.org/version-support/
Plugins not compatible with ESLint 10
eslint-plugin-importhttps://www.npmjs.com/package/eslint-plugin-import
eslint-plugin-reacthttps://www.npmjs.com/package/eslint-plugin-react
Plugin replacements support for CommonJS
requireeslint-plugin-import-xpackage does supportrequire@eslint-react/eslint-pluginpackage does not supportrequireNeither without nor with
.defaultAnalysis
ECMAScript modules
https://nodejs.org/api/esm.html
Find in Files
require(in ui/apps/platform has 58 results in 16 filesAlternative to
type: "module"in package.json file which would imply changes:requirewithimportand add file extensionsexportswithexportESLint supports eslint.config.mjs file name:
https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file
Search Use of .mjs extension in Node.js project that has type commonjs
Solution
Rename and rewrite eslint.config.mjs file
requirewithimportstatementmodule.exportswithexport defaultstatement__dirnamewithimport.meta.dirnameUser-facing documentation
Testing and quality
Automated testing
How I validated my change
npm run tscin ui/apps/platform folder.npm run lint:fast-devin ui/apps/platform folder.