On this page

Code Style Guide

This guide establishes the coding conventions for the shipyard project.

Quick Reference

TopicKey Point
Functional ProgrammingUse flow and pipe to compose transformations; avoid intermediary variables
Naming ConventionsUse descriptive, full-word names that make code self-documenting
Documentation Through CodeAvoid comments; extract complex code to well-named functions instead
Web Components and Native APIsUse custom elements instead of React, Vue, jQuery for interactivity
Integration TestingEvery feature requires meaningful tests using demo apps as fixtures
EffectUse Effect for functional pipes, compositions, and option handling
TypeScript StandardsWrite all code in strict TypeScript; types are living documentation
Astro Content LoadersUse Astro content collections instead of direct file system access