Interface: PublintOptions
Defined in: node_modules/.pnpm/publint@0.3.12/node_modules/publint/src/index.d.ts:149
Properties
level?
optional level: "error" | "warning" | "suggestion";
Defined in: node_modules/.pnpm/publint@0.3.12/node_modules/publint/src/index.d.ts:167
The level of messages to log (default: 'suggestion'
).
suggestion
: logs all messageswarning
: logs onlywarning
anderror
messageserror
: logs onlyerror
messages
pack?
optional pack:
| false
| "auto"
| "bun"
| "npm"
| "yarn"
| "pnpm"
| {
tarball: ArrayBuffer | ReadableStream<Uint8Array<ArrayBufferLike>>;
}
| {
files: PackFile[];
};
Defined in: node_modules/.pnpm/publint@0.3.12/node_modules/publint/src/index.d.ts:188
The package manager to use for packing the pkgDir
. The list of packed files is used in certain linting rules, e.g. files marked as entrypoints but not published.
'auto'
: Automatically detects the package manager usingpackage-manager-detector
.'npm'
/'yarn'
/'pnpm'
/'bun'
: Uses the respective package manager to pack.{ tarball }
: The packed tarball represented as anArrayBuffer
or aReadableStream
.{ files }
: The manually-unpacked files from a tarball.false
: Skips packing the package. This should only be used if all the files inpkgDir
are assumed to be published, e.g. innode_modules
.
Environment notes
- Node.js: Defaults to
'auto'
. All options above are supported. When using a package manager to pack, lifecycle scripts likeprepack
andpostpack
are ignored (except for yarn as it does not allow ignoring lifecycle scripts). - Browser: Only
{ tarball }
and{ files }
are supported and either must be passed to work, as the browser does not have access to the file system.
pkgDir?
optional pkgDir: string;
Defined in: node_modules/.pnpm/publint@0.3.12/node_modules/publint/src/index.d.ts:160
Path to your package that contains a package.json file.
Environment notes
- Node.js: Defaults to
process.cwd()
. - Browser: Automatically inferred from
{ tarball: ArrayBuffer | ReadableStream }
. If{ files: PackFile[] }
is used, this must be the shared directory of all files infiles
. e.g. ifname
has"package/src/index.js", the
pkgDirshould be
"package"`.
strict?
optional strict: boolean;
Defined in: node_modules/.pnpm/publint@0.3.12/node_modules/publint/src/index.d.ts:200
Report warnings as errors.