microsoft / microsoft/fluentui

[Feature]: prevent usage of non v9 packages in v9

Open
#25,467 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Build System Area: Linting NX: core Resolution: Soft Close Type: Feature
Dominant language
TypeScript
Stars
20.3k
Forks
2.9k
Avg merge
2d 9h
Merged PRs (30d)
46

Description

Library

React Components / v9 (@fluentui/react-components)

Describe the feature that you would like added

We don't have any automation/linting in place to prevent using non v9 dependencies within v9 packages that are ment to be used only in v9 scope.

This resolution algorithm might be tricky to implement as we have scenarios where packages mix v8 and v9 (valid scenarios like @fluentui/react-migration-v8-v9 shim package)

Example of actual issues:

Implementation:

linter/validator should work both in ts/js modules and package.json.

Details:

We can easily leverage tags within nx workpsace.json consumed by enabling https://nx.dev/linter/eslint-plugin-nx#enforce-module-boundaries.

The package.json validation might be trickier because if we gonna use project graph analysis based on package.json (current state) it wont build project graph from actual usage only from package.json. if we switch to package graph by usage it will become easy as nx project graph would get us actual dependency map that we can easily validate (both eslint or custom package.json validation)

Have you discussed this feature with our team

No response

Additional context

No response

Validations
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing workspace.json, package.json, and the TypeScript/JavaScript module boundaries described in the issue, then inspect PR #25466 for a concrete failure case. Define validation that rejects non-v9 dependencies in v9 packages while allowing documented mixed packages such as @fluentui/react-migration-v8-v9, and cover both module usage and package manifests.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, react, typescript
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.