Skip to content

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

@Hotell

Description

@Hotell

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions