.. | ||
COMPONENT_DOCUMENTATION.md | ||
FEATURE_BUILDING_TEMPLATE.md | ||
FEATURE_BUILDING.md | ||
react-component-conventions.md | ||
README.md |
Snowball Tools Project Documentation
Overview
This document consolidates project standards, documentation guidelines, and best practices for the Snowball Tools project.
Project Purpose and Standards
Core Principles
- Consistency - Establish consistent patterns across the codebase
- Onboarding - Help new developers understand project conventions
- Maintainability - Make code easier to maintain and extend
- Quality - Encourage best practices that lead to higher quality code
Documentation Standards
TSDoc and TypeDoc
We use TSDoc for documenting TypeScript code and TypeDoc for generating API documentation.
Basic Comment Structure
TSDoc comments start with /**
and end with */
:
/**
* This is a TSDoc comment.
*/
Common TSDoc Tags
Tag | Description |
---|---|
@param |
Documents a function parameter |
@returns |
Documents the return value |
@throws |
Documents exceptions that might be thrown |
@example |
Provides an example of usage |
@remarks |
Adds additional information |
@deprecated |
Marks an item as deprecated |
@see |
Refers to related documentation |
@public , @protected , @private |
Visibility modifiers |
Documentation Best Practices
- Document Public APIs: Always document public APIs thoroughly
- Include Examples: Provide examples for complex functions or classes
- Be Concise: Keep documentation clear and to the point
- Use Proper Grammar: Use proper grammar and punctuation
- Update Documentation: Keep documentation in sync with code changes
- Document Parameters: Document all parameters, including their types and purpose
- Document Return Values: Document what a function returns
- Document Exceptions: Document any exceptions that might be thrown
Generating Documentation
Generate documentation:
yarn docs
Watch and regenerate documentation:
yarn docs:watch
Contributing to Standards
To suggest changes or additions to project standards:
- Discuss proposed changes with the team
- Update the relevant documentation
- Provide examples demonstrating the benefits of the proposed changes
Enforcement
While these standards are not automatically enforced, developers are encouraged to follow them, and code reviewers should check for adherence to these guidelines.