docs: improve parserPreset documentation with examples and options reference#4700
Conversation
…ons reference Expanded the "Parser presets" section in the configuration docs to clarify which default preset is used, explain the three ways to configure parserPreset (npm package, local file, inline parserOpts), and document the most common parserOpts with links to the conventional-changelog-config-spec. Also added context to the examples page explaining how parserOpts works. Closes #4532 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Review Summary by QodoImprove parserPreset documentation with examples and options reference
WalkthroughsDescription• Expanded parser preset documentation with default preset clarification • Added three configuration methods: npm package, local file, inline parserOpts • Included table of common parserOpts with links to specifications • Added context to examples page with cross-reference to configuration docs Diagramflowchart LR
A["Parser Preset Docs"] --> B["Default Preset Info"]
A --> C["Three Config Methods"]
A --> D["parserOpts Table"]
C --> E["NPM Package"]
C --> F["Local File"]
C --> G["Inline Config"]
D --> H["Links to Specs"]
I["Examples Page"] --> J["Issue Validation Example"]
J --> K["Cross-link to Config Docs"]
File Changes1. docs/reference/configuration.md
|
Code Review by Qodo
1. Examples omit parserPreset name
|
| This example uses inline `parserOpts` to configure the parser to recognize custom issue prefixes (e.g. `PROJ-123`). The `references-empty` rule then enforces that every commit references a ticket. | ||
|
|
There was a problem hiding this comment.
1. Examples omit parserpreset name 📎 Requirement gap ≡ Correctness
The updated issue/ticket example explains inline parserOpts but still does not explicitly name which parserPreset (e.g. conventional-changelog-conventionalcommits) the example assumes. This leaves users guessing which preset package/name to configure for consistent parsing behavior.
Agent Prompt
## Issue description
The examples page addition explains inline `parserOpts` but does not explicitly state which `parserPreset` users should configure for the example.
## Issue Context
Compliance requires examples docs to name the preset (e.g. `conventional-changelog-conventionalcommits`) and show how to reference it.
## Fix Focus Areas
- docs/reference/examples.md[7-8]
- docs/reference/examples.md[30-30]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
Pull request overview
Improves commitlint documentation around parserPreset/parserOpts to address confusion raised in #4532 by explaining what parser presets are, how to configure them, and where to find relevant option references.
Changes:
- Expanded
Parser presetsdocumentation with default/purpose explanation and configuration methods (npm package, local file, inlineparserOpts). - Added a quick-reference table of common
parserOptsand links to upstream specs/projects. - Clarified the “Validate for issue/ticket numbers” example and cross-linked it to the configuration docs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/reference/examples.md | Adds explanation of inline parserOpts usage and links readers to parser preset docs. |
| docs/reference/configuration.md | Expands parser preset section with configuration patterns and an options reference table. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Please check if the AI feedback is valid and tackle it if needed |
|
@escapedcat Thanks for the review! I've looked through the automated feedback and the key issues are valid:
I'll push the fixes shortly! |
- Fix incorrect default preset claim (angular, not conventionalcommits) - Clarify link text for parserOpts reference - Add presetConfig documentation - Add semantic-release context Signed-off-by: Chessing234 <[email protected]> Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
Thanks! |
Summary
docs/reference/configuration.mdto explain:conventional-changelog-conventionalcommits)parserPreset(npm package, local file, inlineparserOpts)parserOptsoptionsdocs/reference/examples.mdclarifying what the inlineparserOptsdoes, with a cross-link to the configuration docsMotivation
The existing parser preset docs were minimal — two examples with no explanation of what
parserPresetis, which default is used, or what options are available. Users had to dig through source code to understand configuration.Test plan
Closes #4532
🤖 Generated with Claude Code