github-samples / github-samples/tailspin-toys
Update our repository coding standards
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8
- Forks
- 53
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 4
Description
Clear, documented coding standards keep the codebase consistent and make it easier for new contributors (and Copilot) to produce correct changes. Our current guidance on comments and documentation is thin, which leads to inconsistent commenting — some files are over-commented with restated code, others lack any explanation of intent. We want a single, well-understood convention that says what to document, where, and how, with emphasis on comments and documentation.
What we want
- Comment intent, not mechanics. Comments should explain why a piece of code exists or the reasoning behind a non-obvious decision, not restate what the code already says. Remove comments that merely paraphrase the line below them.
- Document the data layer. Every exported function in
db/andsrc/lib/must have a TSDoc/JSDoc comment describing its purpose, parameters, and return value. Helpers should keep their injectabledbargument documented so the testing pattern stays clear. - Document component contracts. Each reusable
.astrocomponent should document itsPropsinterface so the component API is self-explanatory. - Keep comments current. Treat outdated comments as bugs — update or delete them in the same change that touches the related code.
Acceptance criteria
-
.github/instructionsfiles document a clear comment philosophy: comment why (intent/decisions), not what, and avoid restating code - TSDoc/JSDoc expectations are documented for exported functions in
db/andsrc/lib/, including describing parameters and return values - Documentation expectations for
.astrocomponentPropsinterfaces are documented - TypeScript formatting rules are documented and, where possible, enforced through ESLint
- The README links to or summarizes the updated coding standards
- Linting passes with any newly added rules (run through the
quality-checksskill /npm run lint)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the .github/instructions files, README, and existing TypeScript and ESLint configuration. Review the conventions needed for db/, src/lib/, and reusable .astro component Props interfaces, then run the quality-checks skill or npm run lint. Done means the comment, documentation, formatting, and enforcement expectations are documented, the README points to them, and linting passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, typescript
- Domain
- documentation, tooling
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100