What is publint

publint lints npm packages to ensure the widest compatibility across environments, such as Vite, Webpack, Rollup, Node.js, etc.

A full list of lint rules can be found at the rules page.

How it works

Given an npm package, the site downloads the tarball from the npm registry, and runs publint against it in a web worker. For larger packages, it may take a while to download and lint.

You can also directly paste www.npmjs.com or pkg.pr.new links in the search input to easily lint them!

Use locally

  • Run npx publint in your library directory to lint locally.
  • Run npx publint deps to lint dependencies.
  • Run npx publint --help for the full list of options.

Other resources

  • Are the types wrong?
  • Modern Guide to Packaging JS Library
  • Guide to the package.json exports field

Made by Bjorn Lu