pickier

raw JSON →
0.1.23 verified Fri May 01 auth: no javascript

pickier is a fast, unified linter and formatter built on top of oxlint and prettier, written in Rust and exposed via a CLI and Node.js API. Version 0.1.23 is the latest stable release, with active development and frequent minor updates. It differentiates itself by being 10x faster than ESLint and Prettier combined, leveraging oxc for linting and formatting. Supports JavaScript, TypeScript, JSX, TSX, JSON, and more. Designed for modern monorepos and CI pipelines. Requires Node.js >= 18 or Bun. Ships TypeScript types. Not a replacement for editors yet, but focuses on speed for pre-commit hooks and CI.

error SyntaxError: Named export 'lint' not found. The requested module 'pickier' is a CommonJS module which may not support all module.exports as named exports.
cause Using named import on a CJS module without proper interop, or wrong import syntax.
fix
Use import pickier from 'pickier' then call pickier.lint() or ensure the module is ESM (pickier is ESM).
error Error: Cannot find module '.pickiarrc'
cause Missing or misnamed configuration file.
fix
Create a .pickiarrc file (JSON) or pickier.config.js in the project root.
error TypeError: pickier is not a function
cause Using default import when module exports are named, or wrong version.
fix
Use import pickier from 'pickier' (default export is a function) or use named exports import { lint, format } from 'pickier'.
breaking v0.1.0 changed the default export from an object to a function. Any code using `const pickier = require('pickier'); pickier.lint(...)` will break.
fix Update to `import pickier from 'pickier'; pickier.lint(...)` or use named exports.
deprecated The `--fix` flag in CLI is deprecated; use `--lint-fix` or `--format` explicitly.
fix Replace `--fix` with `--lint-fix` for lint auto-fix or `--format` for formatting.
gotcha pickier does not format files in place unless the `write` option is true. By default, format() returns the formatted string without writing.
fix Pass `write: true` to format() to overwrite files.
gotcha The configuration file must be named `.pickiarrc` or `pickier.config.js` (no `.ts` support yet).
fix Use `.pickiarrc` (JSON) or `pickier.config.js` (CommonJS/ESM).
breaking v0.1.18 removed support for Node.js < 18. The package now requires Node >= 18 or Bun.
fix Upgrade Node.js to 18+ or use Bun.
npm install pickier
yarn add pickier
pnpm add pickier

Shows how to programmatically lint and format files with pickier, using the default API. Runs on provided file patterns or defaults to 'src'.

import { lint, format } from 'pickier';

const args = process.argv.slice(2);
const files = args.length ? args : ['src'];

// Lint files
const lintResult = await lint({ files, fix: false });
console.log(lintResult);

// Format files
const formatResult = await format({ files, check: false });
console.log(formatResult);