Rules Overview
Pickier provides a small set of core rules and a growing set of plugin rules. Core rules are configured under rules
. Plugin rules are configured under pluginRules
.
You can explore the rule implementations directly in the codebase:
- Core and plugin checks live in
packages/pickier/src/cli/run-lint.ts
. - Formatter-related helpers (imports, spacing) live in
packages/pickier/src/format.ts
.
Core:
noDebugger
noConsole
noCondAssign
(optional)noTemplateCurlyInString
(optional)regexp/noUnusedCapturingGroup
(optional)
Plugin:
max-statements-per-line
no-super-linear-backtracking
no-unused-vars
prefer-const
sort-array-includes
sort-classes
sort-enums
sort-exports
sort-heritage-clauses
sort-imports
sort-interfaces
sort-keys
sort-maps
sort-named-imports
sort-object-types
sort-objects
ts/no-require-imports
Groups:
pickier
: sorting and hygiene rulesstyle
: stylistic constraintsregexp
: regex safety checksts
: TypeScript-specific rules
See Advanced » Plugin System for configuration details.
Best practices
- Start new rules at
warn
to gauge noise, then tighten toerror
where appropriate - Prefer bare rule IDs in config (e.g.,
'sort-imports'
), leverage category prefixes for discoverability (e.g.,'regexp/no-super-linear-backtracking'
) - Keep sorting rules (
sort-objects
,sort-keys
,sort-exports
,sort-imports
) enabled to reduce merge conflicts and diff noise - Pair rules with the formatter for auto-fixes where supported
- Use group pages —
pickier
,style
,regexp
— to navigate related options and examples