Closed rclarey closed 1 month ago
No, because other packages aren't relative paths.
Perhaps the https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-internal-modules.md rule would help, and you'd use overrides
to configure different sets of modules as "internal" for each group of packages?
I am working in a monorepo with different "tiers" of packages and I want to restrict which tiers can import from which other tiers. E.g.
core
packages cannot import fromfeature
packages.I tried configuring the existing
no-restricted-paths
rule for this, but I couldn't seem to get it to work sincefrom
is of course treated as a path relative tobasePath
so there is no way to get it to match a package name.Is this something
no-restricted-paths
should be able to do? If not shouldno-restricted-paths
be extended to allow this, or is a new rule better?