Skip to content

chore(react-text): pilot build-independent dependency linting - #37105

Open
Paul Mardling (PaulGMardling) wants to merge 7 commits into
microsoft:masterfrom
PaulGMardling:fix/27727-lint-dependency-resolution
Open

Paul Mardling (PaulGMardling) wants to merge 7 commits into
microsoft:masterfrom
PaulGMardling:fix/27727-lint-dependency-resolution

Conversation

@PaulGMardling

@PaulGMardling Paul Mardling (PaulGMardling) commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Previous Behavior

import/no-extraneous-dependencies can miss undeclared workspace imports until package entry points are built.

New Behavior

The shared v8/v9 rule resolves workspace source manifests without component builds, preserving upstream declaration options, type-import defaults and external-package resolution. Discovery is lazy and cached with manifest freshness checks; composable configs share one plugin identity, and Nx lint hashes the shared implementation and workspace manifests. No opt-in pilot or additional lint target is needed.

Validation (Node 22; NX_DAEMON=false NX_NO_CLOUD=true):

  • node .yarn/releases/yarn-4.18.0.cjs nx run eslint-plugin:test --runInBand --skip-nx-cache: passed, 78 tests.
  • node .yarn/releases/yarn-4.18.0.cjs nx run workspace-plugin:test --runInBand --testPathPatterns=workspace-plugin.spec.ts --skip-nx-cache: passed, 33 tests and 16 snapshots.
  • 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; existing warnings only.
  • node .yarn/releases/yarn-4.18.0.cjs nx run workspace-plugin:type-check --skip-nx-cache: passed.
  • node .yarn/releases/yarn-4.18.0.cjs nx run eslint-plugin:lint --skip-nx-cache --command='yarn run -T tsc --allowJs --checkJs --noEmit --strict --skipLibCheck --module NodeNext --moduleResolution NodeNext --types node src/utils/importPlugin.js src/utils/workspaceResolver.js': passed.

The original v8 charting require is reported with both built entry points absent. Isolated native-hasher probes confirmed implementation/manifest cache invalidation and build-free v8/v9 lint task graphs. Component builds and visual tests were not run; only private tooling changed.

Related Issue(s)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 10, 2026 11:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
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-dependencies Nx target that runs ESLint against the package manifest.
  • Introduce a dedicated flat ESLint config that runs @nx/dependency-checks and 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

@github-actions

Copy link
Copy Markdown

📊 Bundle size report

✅ No changes found

@github-actions

Copy link
Copy Markdown

Pull request demo site: URL

@github-actions

Copy link
Copy Markdown

🕵 . No visual changes in this PR

@PaulGMardling
Paul Mardling (PaulGMardling) marked this pull request as ready for review November 10, 2026 15:48
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@dmytrokirpa Dmytro Kirpa (dmytrokirpa) left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: import/no-extraneous-dependencies lint rule doesn't work without building monorepo packages first

3 participants