linters/eslint-agnostic-core-boundary
no-restricted-imports pattern entries that enforce the dependency arrows between the packages of a workspace: which packages a package’s code may import, by naming the ones it may not.
Exported as standalone builders so the patterns can be unit-tested independently of the larger declarative config, and so the owning project can apply them scoped to each package’s source files.
Workspace package.json dependencies enforce the same boundary in the end, because an import of an undeclared package fails to resolve once the package is installed on its own. Inside the workspace every package is resolvable from every other, so without this rule a wrong arrow would surface only after publishing.
Interfaces
Section titled “Interfaces”| Interface | Description |
|---|---|
| GetPackageBoundaryNoRestrictedImportPatternsParams | Parameters for getPackageBoundaryNoRestrictedImportPatterns. |
| NoRestrictedImportPatternEntry | A single no-restricted-imports pattern entry pairing a group of banned import specifiers with a human-readable message explaining why they are banned. |
Functions
Section titled “Functions”| Function | Description |
|---|---|
| getPackageBoundaryNoRestrictedImportPatterns | Builds the no-restricted-imports pattern entries banning a package’s code from importing the given packages, through their root or any subpath. |