Documentation should be clear, precise, and self-contained while following established style conventions. When writing technical documentation, use precise language, make documentation self-contained, follow style conventions, and create accessible links.
Documentation should be clear, precise, and self-contained while following established style conventions. When writing technical documentation:
// Good
// The function must be synchronous, and must not throw an error.
fastify.setGenReqId(function (rawReq) { return 'request-id' })
// Bad
// This function can be used to set a request ID.
fastify.setGenReqId(function (rawReq) { return 'request-id' })
// Good
// The `preHandler` hook allows you to specify a function that is executed before
// routes' handler.
// Bad
// See Issue #1234 for more details on the preHandler hook.
// Good
// When request logging is enabled, request logs can be customized by
// supplying a createRequestLogMessage() function.
// Bad
// You can customize your request logs by using a createRequestLogMessage() function.
<!-- Good -->
[TypeScript no-floating-promises configuration](https://typescript-eslint.io/rules/no-floating-promises/)
<!-- Bad -->
Click [here](https://typescript-eslint.io/rules/no-floating-promises/) for more information.
Enter the URL of a public GitHub repository