Skip documentation navigation

Pattern packs

Pack fields

FieldTypeRequiredWhat it does
idstringyesLowercase letters, digits, and hyphens. Must equal the file name without the extension.
featurestringyesaiWriting or emDash.
categorystring or objectyesA category id, or an object with id, label, description, and tags.
scopearraynoWhere the pack runs. Defaults to files, comments, gh, commit, reply.
presetsarraynoPreset names that turn the pack on.
tagsarraynoTags for tag:<tag> selection. Falls back to category.tags.
optionsobjectnoThresholds handed to detect as ctx.options.
notesstringnoProse printed under the category in the generated reference.
patternsarrayyes, unless detect is setPattern entries.
detectfunctionyes, unless patterns is set.mjs packs only.

Pattern entry fields:

FieldTypeRequiredWhat it does
phrasestringone of the 3A word-bounded phrase.
openingstringone of the 3A sentence-initial phrase.
regexstringone of the 3A raw regular expression.
flagsstringnoRegex flags for a regex entry. Defaults to gi.
fixstringyesThe replacement text printed in the deny message.
tier1 or 2noDefaults to 1.
showstringnoThe text the reference renderer prints instead of the expanded pattern.

A tier-2 pattern reports only when 2 distinct tier-2 patterns land in the same paragraph. A single tier-2 hit stays quiet.

A regex entry with a named group hit reports only that group as the flagged text.