@noctcore/eslint-plugin-monorepo
A bad fit for a single-package repo, and no-unexported-subpath-import reads each target's package.json from disk, so it needs a real checkout.
Workspace package boundaries: barrel-only imports and exports-map-aware subpaths.
What it solves
Section titled “What it solves”In a workspace, reaching into @acme/ui/src/button/internal works on your machine and couples two packages to a file layout neither of them published. These rules keep cross-package imports on the surface each package actually exposes.
What it will yell at you about
Section titled “What it will yell at you about”It will yell at you about deep imports across workspace packages. no-deep-package-imports is the strict policy (barrel only), no-unexported-subpath-import the looser one (anything the target’s exports map publishes); pick one. Both ship off in the preset, because neither can do anything without your scopes, so enabling recommended alone checks nothing. It is a bad fit for a single-package repo, and no-unexported-subpath-import reads each target’s package.json from disk, so it needs a real checkout.
Install and configure
Section titled “Install and configure”npm install --save-dev @noctcore/eslint-plugin-monorepo @typescript-eslint/parser# or: bun add -D / pnpm add -D @noctcore/eslint-plugin-monorepo @typescript-eslint/parserThe recommended preset turns none of its 2 rules on: each needs options only your project can give, so the preset alone checks nothing. Switch a rule on in the board, then fill in its options as the rule's page shows.
Each rule links to its page, with the options it takes and Incorrect and Correct examples. A good first
read is no-unexported-subpath-import.
--fixsuggestionsneeds optionstype infoEach switch sets a rule to error or off.
scopes must be consumed through their package barrel only — never via a deep subpath into package internals.@scope/pkg/<subpath> that the target workspace package's exports map does not expose. Reads the target package.json from disk.