Rules for formatting and reducing TypeScript code comments in this repository.
-
Apply JSDoc ONLY to public exported functions, interfaces, or classes.
-
Syntax format:
/** * Concise single-sentence description. * @param name Description without type. * @returns Description without type. */
-
Omit types from JSDoc tags (e.g., use
@param id, NOT@param {number} id).
- Use inline comments (
//) ONLY for unexpected business logic or workarounds. - Maximum length: 12 words per comment.
- Place inline comments on the line ABOVE the code, never trailing at the end of the line.
- DO NOT explain native language features (e.g., explaining how
map()orreduce()works). - DO NOT keep dead, legacy, or commented-out code blocks. Delete them.
- DO NOT add file banners, author tags, or timestamps.