Skip to content

@saflib/monorepo


src/package-layout ​

Interfaces ​

InterfaceDescription
CheckPackageLayoutFromInputsOptions-
CheckPackageLayoutOptions-
PackageJsonLayoutFieldsIn-memory package.json fields used by layout checks.
PackageLayoutIssue-

Type Aliases ​

Type AliasDescription
PackageLayoutIssueKind-

Variables ​

VariableDescription
DEFAULT_MAX_SOURCE_LINES-
ROOT_TS_ALLOWLIST.ts / .tsx basenames always allowed at the package root. Everything else should live in a thematic folder — unless it is a direct package export target (see isAllowedRootTsFile).

Functions ​

FunctionDescription
checkPackageLayoutCheck bin/scripts layout conventions, no root-level TS, and oversized files.
checkPackageLayoutFromInputsLayout + oversized checks from already-loaded inputs (git commit / FS).
isAllowedRootTsFileRoot source file is allowed when allowlisted, or when package.json exports it ("." → ./main.ts, or ./<stem> → ./<stem>.ts).
isColocatedRootTestFileRoot foo.test.ts colocated with root foo.ts (same stem, not index).
isLinksPackageRootTsFile*-links packages keep link modules at the package root by convention.
listPackageJsonExportTargetFilesConcrete package.json exports file targets (main.ts, test-app.ts). Skips glob remaps (./foo/*).