convert-to-inferred does not correctly migrate eslint and vitest configs #36069
terrymun
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
After running the "convert-to-inferred" tasks for eslint and vitest on my Nx monorepo (as part of the v22 → v23 upgrade) with the following commands:
nx g @nx/eslint:convert-to-inferrednx g @nx/vitest:convert-to-inferred…my linting and testing tasks start to fail. After some debugging, it turns out that both eslint and vitest configurations also need to be updated, as the paths used in them are relative to workspace root, while post-conversion the inferred tasks expect the paths to be relative to project root.
The error messages are not very clear, only informing me, for example, that "parserOptions" are not properly configured (for linting tasks) or "cannot resolve entry module [some_path]/vite.config.ts".
For me, the fix that I need to manually apply after debugging (with some help from Claude Code), is:
eslint.config.mjsfiles need to have itslanguageOptions.parserOptions.project[Number]paths changed from being workspace-root relative to project-root relativeoptions.configfrom the task configuration inproject.jsonfilesCould the convert-to-inferred tool for eslint and vitest be updated to at least inform users of additional migration or clean-up tasks needed?
Beta Was this translation helpful? Give feedback.
All reactions