Update coding standards guidance and add publishers helper foundation - #57
Open
Thedezinevipul wants to merge 1 commit into
Open
Update coding standards guidance and add publishers helper foundation#57Thedezinevipul wants to merge 1 commit into
Thedezinevipul wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates repository Copilot guidance and adds a new data-layer helper to fetch publisher summaries for upcoming filtering work in the Astro build-time data layer.
Changes:
- Expanded
.github/copilot-instructions.mdwith additional documentation/commenting expectations. - Added
src/lib/publishers.tswith an injectablegetAllPublishers(db)helper returning stable, name-ordered publisher summaries.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/copilot-instructions.md |
Updates documented coding standards for comments/TSDoc and file-purpose headers. |
src/lib/publishers.ts |
Introduces a new Drizzle data-access helper for ordered publisher summaries. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
35
to
39
| ### Code formatting requirements | ||
|
|
||
| - Every exported function should have a TSDoc comment describing its purpose, parameters, and return value. | ||
| - Before imports or any code, add a comment block to the file that explains its purpose. | ||
| - Use TypeScript with explicit types for function parameters and return values, especially in the data layer (`db/`, `src/lib/`) | ||
| - Frontend code (TypeScript, Astro) must pass ESLint checks (`npm run lint`) |
Comment on lines
+21
to
+26
| export async function getAllPublishers(db: Database): Promise<Publisher[]> { | ||
| const rows = await db | ||
| .select({ id: publishers.id, name: publishers.name }) | ||
| .from(publishers) | ||
| .orderBy(asc(publishers.name)); | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updates the Copilot coding guidance and introduces a small data-layer foundation for upcoming game filtering work.
Related Issue
Closes #9
Type of Change
Changes Made
.github/copilot-instructions.mdto require:src/lib/publishers.tswith an injectable-db helpergetAllPublishers(db)getAllPublishers(db)returns stable, ordered publisher summaries (id,name) to support upcoming filter UI/data wiringTesting
Data Layer Changes
npm run test:unit- all tests passnpm run db:generate) for any schema changeFrontend Changes
npm run test:e2e- all tests passdata-testidattributes to interactive elementsnpm run build)Checklist
Additional Notes
This PR intentionally includes the publishers helper as a foundation for the upcoming filtering work tracked in issue #8 (category/publisher filtering), so follow-up UI and page-query changes can build on a shared data-access utility.