Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
… to latest Stays within ESLint 9 — eslint-plugin-react's latest stable (7.37.5) only declares peer support up to eslint ^9.7, so a jump to ESLint 10 is blocked until that plugin catches up. Bumped: eslint, @eslint/js, typescript-eslint, eslint-plugin-jest, eslint-plugin-react-hooks, globals, prettier.
…tier to latest Same treatment as eslint-config-web-widgets: keep eslint/@eslint/js/globals/prettier current within their existing major versions. Left prettier-plugin-packagejson on 2.x (latest is 3.x, a separate major bump) and @prettier/plugin-xml unchanged (already latest).
…slint-react/eslint-plugin eslint-plugin-react has no ESLint 10 support, which blocks the ESLint upgrade. Hooks rules stay with eslint-plugin-react-hooks; the overlapping eslint-react hooks rules are turned off. jsx-boolean-value is replaced by a no-restricted-syntax selector. Fixes the two new errors: createRef in a function component (image-cropper preview) and a Floating UI flushSync false positive (datagrid).
…slint-plugin-import-x eslint-plugin-import does not support ESLint 10; import-x is a maintained fork with the same rules and ESLint 10 support. Rules and settings move to the import-x/ prefix; lint results are unchanged.
Bumps eslint to 10.x and @eslint/js to 10.x across shared configs, automation and web-actions. Fixes findings from rules newly enabled in eslint:recommended (preserve-caught-error, no-useless-assignment). Drops @babel/eslint-parser from pluggable-widgets-tools, as it is only used by its unused legacy eslintrc config and does not support ESLint 10.
…DojoOnNavigation The hook reassigned a module-level flag during render and called useEffect conditionally. Both now happen inside a single unconditional effect.
E2E runs on Playwright; the cypress configs pointed at a module that no longer exists. The .eslintrc files were already ignored since ESLint 9 and are not supported by ESLint 10. eslint-plugin-cypress was not used by any config.
df817e8 to
1c4d048
Compare
AI Code Review
What was reviewed
Skipped (out of scope): Findings
|
Pull request type
Dependency changes (any modification to dependencies in
package.json)Description
Migrates the repo to ESLint 10. ESLint 9 is now marked as deprecated/unsupported on npm.
Two plugins blocked the upgrade, so they are replaced with maintained alternatives that support ESLint 10:
eslint-plugin-react→@eslint-react/eslint-plugin: no ESLint 10 support upstream yet (jsx-eslint/eslint-plugin-react#3977). Uses therecommended-typescriptpreset. Rules we set explicitly keep their severity. Hooks rules stay witheslint-plugin-react-hooks, and the duplicate eslint-react hooks rules are turned off.jsx-boolean-valueis replaced by ano-restricted-syntaxselector, which no longer auto-fixes.eslint-plugin-import→eslint-plugin-import-x: same rules, maintained fork. Rules and settings move fromimport/toimport-x/, so new disable comments need theimport-x/prefix.Other changes:
eslintto 10.x and@eslint/jsto 10.x in the shared configs,automation/run-e2e,automation/snapshot-generatorandweb-actions. Bump the related plugins,globalsandprettierto their latest versions.@babel/eslint-parserfrom@mendix/pluggable-widgets-toolsthrough a root override. Only the tools package's unused legacy eslintrc config uses it, and it doesn't support ESLint 10. This follows the existing overrides for that package's other eslint dependencies.preserve-caught-error: rethrown errors now pass{ cause }(html-element-web,automation/utils).no-useless-assignmentinrich-text-web'sIndent.ts.createRef→useRefinimage-cropper-web's editor preview.flushSyncusage indatagrid-web.google-tag-web'suseDojoOnNavigation. It mutated module state during render and calleduseEffectconditionally (react-hooks/globalserror, already onmain). Both now happen in one unconditional effect.cypress/foldereslint-plugin-cypress.eslintrc*files, which ESLint 9 already ignoredLint results (all 58 widget/module packages, before → after): errors 1 → 0. The existing warnings are unchanged. New warnings come from eslint-react's recommended rules (for example
naming-convention-ref-name,no-array-index-key,jsx-no-children-prop,use-state). They're advisory and can be cleaned up or tuned in follow-ups.Note on
@eslint-react/eslint-plugin: it's actively maintained, gets about 2.4M weekly downloads and has been released since 2023. It is mostly a single-maintainer project and ships major versions often, so it's pinned with~5.24.8.What should be covered while testing?
pnpm lintpasses across packages. The tests fordatagrid-web,image-cropper-web,html-element-webandrich-text-webpass.google-tag-web: page-change tracking (dojoonNavigation) still works in a Mendix app, and the "window.dojois not found" message is still logged once when dojo is missing.