Give exported TypeScript interfaces and non-obvious functions doc comments stating their intent
In cart Checkout
Versions
A version describes what work must do to comply with the rule. Major: work that complied with the previous version could fail this one. Minor: it still complies, and this version adds guidance. Patch: it still complies, and nothing is added. How versions work
3 versionsCompare versions
- Exported functions, classes, methods, types, and components need a doc comment stating intent and every guarantee callers rely on, with an eslint-plugin-jsdoc configuration that checks that scope; unexported functions need one only when their intent isn't apparent; file headers are no longer required on every file, and guidance on constraints, TODOs, and body comments moved to the Documentation practice rules.
- Draft interface contracts before implementation and allow high-level phase intent alongside hidden constraints.
- Add the rule.