Packs
A pack is a set of ESLint rules for one plugin. For libraries that need no plugin, see Guards. Pawl ships each pack as data, its rules and levels, and your project installs the plugin. There are 50, each checked against its real plugin.
pawl add zod testing-library # installs eslint and the plugins, writes eslint.config.js if neededpawl doctor # shows which packs are activeThe packs
Section titled “The packs”| Kind | Packs |
|---|---|
| Base, on whenever ESLint is the linter | javascript, typescript |
| Frameworks | react-hooks, preact, next, angular, nest, hono, vue, svelte, astro, astro-doctor, solid, lit, stencil |
| Testing | vitest, jest, jest-dom, testing-library, playwright, cypress, storybook |
| Libraries | zod, tanstack-query, tanstack-router, i18next, ai, tailwind, graphql, graphql-schema, swagger |
| Rule packs | unicorn, regexp, node, promise, perfectionist, jsdoc, security, sonarjs, jsx-a11y, compat, depend, cspell |
| Formats | yaml, jsonc, markdown, toml, html, package-json, pnpm |
How packs switch on
Section titled “How packs switch on”- A pack for something your project depends on switches on as soon as its plugin is installed.
inittells you which ones fit. - The rule packs and formats are opt-in:
pawl addrecords them underpacksin the policy. - A pack starts from the plugin’s own recommended rules, then applies the standard’s levels, then your policy’s
rules. - Where Biome is the linter, it keeps the rules it already enforces, so nothing is reported twice.
- The
jsx-a11ystandard is in the catalog, so Biome and Oxlint enforce it without the plugin. Under ESLint its rules come with the pack, and are not reported as missing while the pack is off. - A rule the installed plugin does not have is left out and listed by
pawl doctor, so an older plugin does not break the run.
Starting from a plugin’s preset
Section titled “Starting from a plugin’s preset”unicorn/recommended in packs starts the unicorn pack from the plugin’s own recommended preset. Any pack takes a preset name this way.
import { definePolicy } from '@santi020k/pawl'
export default definePolicy({ packs: ['unicorn/recommended', 'regexp']})Running next to Biome
Section titled “Running next to Biome”An optional pack runs through ESLint next to Biome, or with ESLint as the only linter. The ESLint config stays one line:
import { eslint } from '@santi020k/pawl'
export default eslint({ root: import.meta.dirname })MIT licensed. Made by santi020k.