Repository navigation
fix(eslint-plugin): validate workspace dependencies without builds - #37105
Open
Paul Mardling (PaulGMardling) wants to merge 12 commits into
Open
Paul Mardling (PaulGMardling) wants to merge 12 commits into
Paul Mardling (PaulGMardling) wants to merge 12 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
3 open issues
The guard requiresgraph.nodes['react-text'].data.targets.buildto exist. That can fail even when… · New This error message is confusing because it tells users to run the same command that triggers the… · New Usingnx/src/...imports relies on Nx private/internal modules, which are not part of the public… · New
What changed in this PR
Adds an opt-in Nx target for react-text to lint package.json dependencies using Nx’s project graph/file map so missing workspace deps are detected without requiring builds.
Changes:
- Add
react-text:lint-dependenciesNx target that runs ESLint against the package manifest. - Introduce a dedicated flat ESLint config that runs
@nx/dependency-checksand hard-fails when graph/file-map cache is missing. - Add a Jest regression suite (21 cases) and document limitations/usage in the package README.
| File | Description |
|---|---|
| packages/react-components/react-text/library/project.json | Adds the opt-in lint-dependencies target and cache/inputs configuration. |
| packages/react-components/react-text/library/config/eslint.config.cjs | Adds a flat ESLint config for manifest dependency checks with explicit graph/file-map guards. |
| packages/react-components/react-text/library/config/dependency-lint.test.js | Adds regression tests validating behavior, edge cases, and missing-graph failure modes. |
| packages/react-components/react-text/library/README.md | Documents how to run the pilot and known limitations vs existing linting. |
| change/@fluentui-react-text-932fc45f-fc19-4898-ad7d-4debde6037e0.json | Adds a Beachball none change entry for the tooling-only pilot. |
Review effort: Lite
Copilot stopped reviewing on behalf of
Paul Mardling (PaulGMardling) due to an error
November 10, 2026 11:20
📊 Bundle size report✅ No changes found |
|
Pull request demo site: URL |
🕵 . No visual changes in this PR |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Dmytro Kirpa (dmytrokirpa)
requested changes
Nov 19, 2026
Contributor
There was a problem hiding this comment.
I don’t think this PR solves the original problem mentioned in the linked issue. The correct direction is either:
- Integrate Nx dependency validation into the shared lint configuration and roll it out systematically, or
- Implement or configure a custom rule that directly understands workspace package imports and manifest declarations.
Replace the react-text manifest pilot with workspace-aware resolution in the shared dependency rule, preserving existing options and exemptions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ests Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Paul Mardling (PaulGMardling)
requested a review
from Dmytro Kirpa (dmytrokirpa)
November 23, 2026 12:31
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.


Previous Behavior
import/no-extraneous-dependenciescan silently miss undeclared workspace imports when their package entry points have not been built. This let the Monaco/charting dependency violation escape PR lint and surface later in release builds.New Behavior
This follows Dmytro's second suggested route: make dependency checking understand workspace imports and manifest declarations directly. Rather than replace the upstream rule, a custom workspace-aware resolver supplies source
package.jsonpaths to the existingimport/no-extraneous-dependenciesrule. The upstream rule still checks the importing package's declarations and retains its options, exemptions and diagnostics.The resolver discovers package names from the repository's
workspacespatterns, so shared v8/v9 lint catches missing declarations without compiled entry points, workspace links or an Nx graph cache. It is scoped to this dependency rule; external packages and other import rules retain their configured resolution. It does not validate subpath exports or whether imported files exist.Discovery is cached, with metadata freshness checks on each import-bearing file to detect added, removed or renamed workspaces. Nx changes only track the implementation and manifests as lint cache inputs; they do not introduce Nx dependency validation or build prerequisites.
Reproduced the original Monaco/charting failure with both charting entry points absent: upstream reported nothing, while the adapted rule reported the missing dependency. Only private tooling changed; no component builds or visual tests were run locally.
Validation: 528 tests and 226 snapshots passed; lint and type checks passed
Node 22;
NX_DAEMON=false NX_NO_CLOUD=true.node .yarn/releases/yarn-4.18.0.cjs nx run-many -t test -p eslint-plugin,workspace-plugin --runInBand --skip-nx-cache --parallel=1: passed on the current revision, 83 plugin tests and 445 workspace-plugin tests; 226 snapshots.node .yarn/releases/yarn-4.18.0.cjs nx run eslint-plugin:lint --skip-nx-cache --command='yarn run -T eslint src && yarn run -T tsc --allowJs --checkJs --noEmit --strict --skipLibCheck --module NodeNext --moduleResolution NodeNext --types node src/utils/importPlugin.js src/utils/workspaceResolver.js': passed after the cleanup; existing lint warnings only.node .yarn/releases/yarn-4.18.0.cjs nx run-many -t lint -p eslint-plugin,workspace-plugin,scripts-babel,scripts-jest,verify-bundle-isolation,react-monaco-editor,react-text --skip-nx-cache --parallel=3: passed before the final cleanup; existing warnings only.node .yarn/releases/yarn-4.18.0.cjs nx run workspace-plugin:type-check --skip-nx-cache: passed; workspace-plugin code was unchanged by the final cleanup.Related Issue(s)
import/no-extraneous-dependencieslint rule doesn't work without building monorepo packages first #27727.