Linter for Browserslist configuration files. Checks target browser queries against popular mistakes like missing 'not dead', ignoring browser diversity, or listing already dead browsers. Stable version 0.4.0, released frequently alongside Browserslist ecosystem. Integrates with CI via CLI or npx. Differentiator: opinionated rules to avoid common footguns when defining browser targets, with online checking at browsersl.ist.
npm install browserslist-lintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import and use the lint function programmatically with TypeScript, including options and handling warnings.
Upgrade Node.js to version 20 or higher.
Use import { lint } from 'browserslist-lint' instead of default import.Provide the file path string; to lint a string, use the 'config' option instead.
Change to: import { lint } from 'browserslist-lint'Provide the file path string, e.g., { path: '.browserslistrc' }Install peer dependency: npm install picocolors