Require comprehensive JSDoc documentation for classes, complex functions, and all exported functions to improve codebase maintainability and developer onboarding. Focus especially on code with broad reach across the codebase or non-obvious functionality.
Require comprehensive JSDoc documentation for classes, complex functions, and all exported functions to improve codebase maintainability and developer onboarding. Focus especially on code with broad reach across the codebase or non-obvious functionality.
Key requirements:
Example of good JSDoc:
/**
* Captures the current reactive context and returns a restore function.
* Used to preserve effect and component state across async boundaries.
* @param {boolean} [track=true] - Whether to track the current context
* @returns {() => void} Function to restore the captured context
*/
export function capture(track = true) {
// implementation
}
This practice makes the codebase significantly more approachable for new developers and reduces the cognitive load when working with complex APIs.
Enter the URL of a public GitHub repository