publint is a tool for linting npm packaging errors to ensure compatibility across environments. The current stable version is 0.3.18, with frequent patch releases addressing edge cases in export mapping, file existence checks, and CJS/ESM interop warnings. It differentiates from tsc or api-extractor by focusing specifically on package.json validation, including exports, imports, main, types fields, and CommonJS default export issues. It provides a CLI, API, and online playground, and supports Node >=18.
npm install publintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates using the publint API to lint a package.json and print formatted messages.
Upgrade Node to >=18.
Use import statements instead of require().
Stay updated via changelog.
Upgrade Node to 18 or later.
Add "type": "module" in package.json and use import statements.
Import from 'publint/utils' instead of 'publint'.