fix(linter): handle variable references in replaceOverride (#34026)#35306
fix(linter): handle variable references in replaceOverride (#34026)#35306llwt wants to merge 7 commits into
Conversation
The migration generator (`@nx/plugin:migration`) fails when due to ESLint flat config not being parsed correctly, leading to an error. This happens because `replaceOverride` uses `parseTextToJson` to parse the config, which fails for non-JSON-serializable JavaScript expressions. This PR fixes the issue by using AST parsing, like we did for `hasOverrides` here #33548. Fixes #34010 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> (cherry picked from commit 9fb5a6c)
|
View your CI Pipeline Execution ↗ for commit cf4fc13
☁️ Nx Cloud last updated this comment at |
ktfmt... is supposed to be pinned ktfmt is now actually pinned (cherry picked from commit 537543e) chore: formatting chore(linter): format ast-utils.ts Co-authored-by: llwt <llwt@users.noreply.github.com> chore(eslint): format ast-utils.ts Co-authored-by: llwt <llwt@users.noreply.github.com> fix(eslint): restore generic type arguments Co-authored-by: llwt <llwt@users.noreply.github.com>
bdba10a to
433ef1e
Compare
There was a problem hiding this comment.
Nx Cloud has identified a possible root cause for your failed CI:
We determined this failure is unrelated to the PR changes, which only touch ktfmt version pinning and ESLint flat config utilities — neither of which could affect React library build output or JSX transform behavior. The failing tests in e2e-react appear to stem from a pre-existing environment issue with rollup-plugin-typescript2 and JSX development transforms, as e2e-react is not among the touched projects in this PR.
No code changes were suggested for this issue.
Trigger a rerun:
🔔 Heads up, your workspace has pending recommendations ↗ to auto-apply fixes for similar failures.
🎓 Learn more about Self-Healing CI on nx.dev
|
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
…#32881)
This PR fixes an issue with new docs where graph or PDV tag with inner
JSON content will cause formatting issues with other code blocks on the
page.
Rather than using
<slot/>to render the inner code fence, which seemsto not play well with the rest of the page, we instead skip rendering
the inner content altogether, and pass the data as
astroRawDatato theunderlying React component. This removes the need to handle
HTML/attribute parsing, so it is much cleaner in addition to resolving
conflicts.
Note: Also fixed some of the previous JSON content as they were invalid.
Current Behavior
Expected Behavior
Related Issue(s)
Fixes #
Flat config overrides util may fail when it isn't a plain JS object.
This PR makes the
hasOverridesfunction more robust against thesecases.
Fixes #31796
(cherry picked from commit 05bd3a4)