Skip to content

Enhancement: Allow no-extraneous-dependencies to check internal Imports #1678

@narthollis

Description

@narthollis

In our monorepo I have setup that anything prefixed with out npm-scope is marked as internal, ie. ^@scope-.*/. This is working really well for us.

We are now at a stage where we are going to need to publish some of our packages to be consumed in other projects/repos. Due to this I now wish to use no-extraneous-dependencies to ensure that everyone is rembering to include this internal package references.

I did consider doing this by removing the internal regex, but this then effects the import sortinng (as we keep our internal deps grouped seperatly to our external deps - thanks to the order rule)

What I would like to see is to add an option to no-extraneous-dependencies to allow it to check internal imports based on a regex (either the internal regex or a newly defined on the rule config) as well as external.

I would be happy to work on a PR to add this option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions