Skip to content

Docs | Project Section #25

@ethanillingsworth

Description

@ethanillingsworth

Summary

See this page for more details. Details section pulled from the page above.

Details

Project Development Section

  • Main source code lives in /src
  • Explain scripts (build & serve)
  • Use VS Code (launch.json) variant scripts
  • Explain how js comments work with JSDoc (see example of jsdoc comment below)
  • Follow existing file structure and code style
  • Submit PRs for both doc and code changes

Example

/**
* Calculates the area of a rectangle.
*
* @function calculateRectangleArea
* @param {number} width - The width of the rectangle in units.
* @param {number} height - The height of the rectangle in units.
* @returns {number} The calculated area (width × height).
* @throws {TypeError} If either `width` or `height` is not a number.
* @example
* // Basic usage
* const area = calculateRectangleArea(5, 10);
* console.log(area); // 50
*
* @see {@link https://en.wikipedia.org/wiki/Rectangle|Rectangle on Wikipedia}
*/
function calculateRectangleArea(width, height) {
  if (typeof width !== 'number' || typeof height !== 'number') {
    throw new TypeError('Width and height must be numbers.');
  }
  return width * height;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestgood first issueGood for newcomershacktoberfestParticipating in DigitalOcean Hacktoberfest

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions