src/package-layout
Interfaces
| Interface | Description |
|---|---|
| CheckPackageLayoutFromInputsOptions | - |
| CheckPackageLayoutOptions | - |
| PackageJsonLayoutFields | In-memory package.json fields used by layout checks. |
| PackageLayoutIssue | - |
Type Aliases
| Type Alias | Description |
|---|---|
| PackageLayoutIssueKind | - |
Variables
| Variable | Description |
|---|---|
| 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
| Function | Description |
|---|---|
| checkPackageLayout | Check bin/scripts layout conventions, no root-level TS, and oversized files. |
| checkPackageLayoutFromInputs | Layout + oversized checks from already-loaded inputs (git commit / FS). |
| isAllowedRootTsFile | Root source file is allowed when allowlisted, or when package.json exports it ("." → ./main.ts, or ./<stem> → ./<stem>.ts). |
| isColocatedRootTestFile | Root foo.test.ts colocated with root foo.ts (same stem, not index). |
| isLinksPackageRootTsFile | *-links packages keep link modules at the package root by convention. |
| listPackageJsonExportTargetFiles | Concrete package.json exports file targets (main.ts, test-app.ts). Skips glob remaps (./foo/*). |