What problem does it solve?
The schemas package benefits from consistent, readable code; this rule codifies conventions to reduce cognitive load, prevent drift, and streamline maintenance across all schema modules.
Core Features & Use Cases
- Naming: use descriptive, intention-revealing names; functions should be verbs; variables are nouns.
- Guard clauses and early returns: flatten control flow by handling edge cases first to keep the happy path clear.
- Nesting depth: limit nesting to two levels; extract helpers when adding a third level.
- Functional patterns: prefer pure functions and simple data transformations over unnecessary classes.
- Single responsibility: ensure functions do one thing and separate concerns when they grow.
- File organization: organize by role with clear file naming and separation of schemas, types, and utilities.
- Error handling & formatting: follow safe parsing, consistent error reporting, and automatic formatting per project standards.
Quick Start
Apply these style guidelines to new and existing schema files to ensure consistency.