microsoft / fluentui

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.
https://react.fluentui.dev
Other
18.53k stars 2.74k forks source link

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

Open Hotell opened 2 years ago

Hotell commented 2 years ago

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

msft-fluent-ui-bot commented 1 year ago

Because this issue has not had activity for over 180 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.