Presets Overview
Presets are curated rule bundles that help you adopt eslint-plugin-tsdoc-require-2 in controlled stages.
Use one preset as your baseline, then add rule overrides for project-specific policy.
How to choose quicklyâ
| If you want... | Start with |
|---|---|
| Minimal comment presence enforcement | recommended |
| More narrative context in docs | detailed |
| Package-level docs for published libraries | packages |
| JSDoc-style function tag discipline | jsdoc |
| TSDoc-first function + type-parameter docs with tag restrictions | tsdoc |
| TypeDoc declaration-kind tagging | typedoc |
| Strict TypeDoc workflow with module/remarks and restricted tags | typedoc-strict |
| Maximum strictness for audits or experiments | all |
Preset catalogâ
recommended: Require docs to exist.detailed:recommended+ require@remarks.packages:detailed+ require@packageDocumentation.typedoc: TypeDoc declaration-kind tags.typedoc-strict:typedoc+ module/remarks + restricted tags.tsdoc: TSDoc-style function/type tags + restricted tags.jsdoc: Function-oriented JSDoc-style tags.all: Every plugin rule.
Preset migration ladderâ
Most teams succeed with this progression:
recommendeddetailedorjsdoctsdocortypedoc/typedoc-strict
Jumping straight to all is usually expensive and noisy unless your codebase already has consistent docs.
How rules compose inside presetsâ
Each preset combines the same three policy layers in different strengths:
- Presence layer:
tsdoc-require-2/require - Required content layer: one or more
require-*tag rules - Vocabulary control layer: optional
tsdoc-require-2/restrict-tags
This composition is why preset choice matters: two presets can include similar rules but express different documentation policy.
Matrix overviewâ
The matrix below is generated by scripts/sync-presets-rules-matrix.mjs and
kept in sync with the README.
Preset matrixâ
Fixlegend:đ§= autofixableđĄ= suggestions availableâ= report only
Preset keylegend:- đą â
tsdocRequire.configs.recommendedâ Minimal baseline TSDoc enforcement. - đĄ â
tsdocRequire.configs.detailedâ Require comments plus @remarks. - đ â
tsdocRequire.configs.packagesâ Package docs baseline with @packageDocumentation. - đ” â
tsdocRequire.configs.typedocâ Conservative TypeDoc declaration-kind tags. - đŽ â
tsdocRequire.configs["typedoc-strict"]â Strict TypeDoc with module/remarks and tag restrictions. - đŁ â
tsdocRequire.configs.tsdocâ TSDoc-focused baseline with function/type tags plus tag restrictions. - đŠ â
tsdocRequire.configs.jsdocâ JSDoc-style function-tag baseline. - â« â
tsdocRequire.configs.allâ All plugin rules. Use for audits and deliberate strictness.
- đą â
Flat Config usage patternâ
Use one preset baseline, then add an override block.
import tsdocRequire from "eslint-plugin-tsdoc-require-2";
export default [
tsdocRequire.configs.tsdoc,
{
rules: {
"tsdoc-require-2/require": ["error", { exportMode: "all" }],
},
},
];
Avoid stacking multiple presets unless you intentionally want merge-order behavior.
For setup steps, see Getting Started.