-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat: Add 4 new cursorrules for modern TypeScript tech stacks #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- hono-typescript-cloudflare: Edge-first APIs with Hono v4 and Cloudflare Workers - drizzle-orm-typescript: Type-safe database layer with Drizzle ORM - remix-react-typescript: Full-stack web apps with Remix v2 and React - bun-typescript-runtime: Fast all-in-one JavaScript runtime with Bun
WalkthroughAdds four new Cursor Rules documentation sets (Bun TypeScript Runtime, Drizzle ORM TypeScript, Hono TypeScript Cloudflare Workers, Remix React TypeScript). Each set includes a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–25 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 8
🧹 Nitpick comments (5)
rules/bun-typescript-runtime-cursorrules-prompt-file/.cursorrules (1)
303-316: Clarify configuration examples with proper separation.The Type Safety section mixes bunfig.toml and tsconfig.json examples within a single code block, which may confuse users. Consider separating them into distinct code blocks with appropriate language identifiers.
### Type Safety -```typescript -// bunfig.toml for strict mode -// [install] -// auto = "force" - -// tsconfig.json -{ - "compilerOptions": { - "strict": true, - "types": ["bun-types"] +```toml +# bunfig.toml +[install] +auto = "force" +``` + +```json +// tsconfig.json +{ + "compilerOptions": { + "strict": true, + "types": ["bun-types"] } }</blockquote></details> <details> <summary>rules/drizzle-orm-typescript-cursorrules-prompt-file/.cursorrules (1)</summary><blockquote> `87-114`: **Separate connection examples for clarity.** The database connection section shows two different connection examples (PostgreSQL and Turso/LibSQL) within the same code block with duplicate imports and exports. Consider separating them into distinct code blocks to avoid confusion. Consider restructuring as: ```markdown ### PostgreSQL Connection \`\`\`typescript import { drizzle } from 'drizzle-orm/node-postgres' // ... PostgreSQL example \`\`\` ### Turso/LibSQL Connection \`\`\`typescript import { drizzle } from 'drizzle-orm/libsql' // ... Turso example \`\`\`rules/hono-typescript-cloudflare-cursorrules-prompt-file/.cursorrules (1)
231-238: OpenAPI example is incomplete.The OpenAPI example at line 237 shows
app.openAPIRegistry.registerPath({...})which is a placeholder rather than a working example. Consider either providing a complete example or adding a comment indicating users should refer to documentation.### OpenAPI Documentation ```typescript import { OpenAPIHono } from '@hono/zod-openapi' const app = new OpenAPIHono() app.doc('/doc', { openapi: '3.0.0', info: { title: 'API', version: '1.0.0' } }) -app.openAPIRegistry.registerPath({...}) +// See @hono/zod-openapi documentation for route registration</blockquote></details> <details> <summary>rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md (1)</summary><blockquote> `51-53`: **Consider providing specific author attribution.** The generic "Contributed by the community" attribution doesn't align with the coding guideline to "use this README to provide credit to the original author." If a specific author created this rule, please credit them appropriately. Based on coding guidelines, which state that READMEs should provide credit to original authors. </blockquote></details> <details> <summary>rules/remix-react-typescript-cursorrules-prompt-file/README.md (1)</summary><blockquote> `53-55`: **Consider providing specific author attribution.** The generic "Contributed by the community" attribution doesn't align with the coding guideline to "use this README to provide credit to the original author." If a specific author created this rule, please credit them appropriately. Based on coding guidelines, which state that READMEs should provide credit to original authors. </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used**: CodeRabbit UI **Review profile**: CHILL **Plan**: Pro <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between fc2ce049c55b369b498eef396506a7a269a1b461 and 1fe61cf22a07e5978a058989f3a6e2c6b930a554. </details> <details> <summary>📒 Files selected for processing (8)</summary> * `rules/bun-typescript-runtime-cursorrules-prompt-file/.cursorrules` (1 hunks) * `rules/bun-typescript-runtime-cursorrules-prompt-file/README.md` (1 hunks) * `rules/drizzle-orm-typescript-cursorrules-prompt-file/.cursorrules` (1 hunks) * `rules/drizzle-orm-typescript-cursorrules-prompt-file/README.md` (1 hunks) * `rules/hono-typescript-cloudflare-cursorrules-prompt-file/.cursorrules` (1 hunks) * `rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md` (1 hunks) * `rules/remix-react-typescript-cursorrules-prompt-file/.cursorrules` (1 hunks) * `rules/remix-react-typescript-cursorrules-prompt-file/README.md` (1 hunks) </details> <details> <summary>🧰 Additional context used</summary> <details> <summary>📓 Path-based instructions (3)</summary> <details> <summary>**/*.md</summary> **📄 CodeRabbit inference engine (.cursorrules)** > Always use Markdown for documentation and README files Files: - `rules/bun-typescript-runtime-cursorrules-prompt-file/README.md` - `rules/drizzle-orm-typescript-cursorrules-prompt-file/README.md` - `rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md` - `rules/remix-react-typescript-cursorrules-prompt-file/README.md` </details> <details> <summary>rules/*/README.md</summary> **📄 CodeRabbit inference engine (.cursorrules)** > `rules/*/README.md`: Refer to the README in each folder for guidance on naming conventions and descriptions > Each .cursorrules file may have an accompanying README.md file in its folder; use this README to provide credit to the original author and a brief description of the .cursorrules file's purpose Files: - `rules/bun-typescript-runtime-cursorrules-prompt-file/README.md` - `rules/drizzle-orm-typescript-cursorrules-prompt-file/README.md` - `rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md` - `rules/remix-react-typescript-cursorrules-prompt-file/README.md` </details> <details> <summary>**/*.{md,cursorrules}</summary> **📄 CodeRabbit inference engine (.cursorrules)** > `**/*.{md,cursorrules}`: Use clear and concise language in all documentation and .cursorrules files > When adding examples or explanations, focus on practical use cases for Cursor AI users Files: - `rules/bun-typescript-runtime-cursorrules-prompt-file/README.md` - `rules/drizzle-orm-typescript-cursorrules-prompt-file/README.md` - `rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md` - `rules/remix-react-typescript-cursorrules-prompt-file/README.md` </details> </details><details> <summary>🪛 markdownlint-cli2 (0.18.1)</summary> <details> <summary>rules/drizzle-orm-typescript-cursorrules-prompt-file/README.md</summary> 39-39: Fenced code blocks should have a language specified (MD040, fenced-code-language) </details> <details> <summary>rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md</summary> 39-39: Fenced code blocks should have a language specified (MD040, fenced-code-language) </details> <details> <summary>rules/remix-react-typescript-cursorrules-prompt-file/README.md</summary> 39-39: Fenced code blocks should have a language specified (MD040, fenced-code-language) </details> </details> </details> <details> <summary>🔇 Additional comments (12)</summary><blockquote> <details> <summary>rules/bun-typescript-runtime-cursorrules-prompt-file/README.md (1)</summary><blockquote> `1-61`: **Well-structured README with clear documentation.** The README follows the expected format with Overview, Tech Stack, coverage details, usage instructions, and related links. The content is clear, concise, and provides practical guidance for Cursor AI users. </blockquote></details> <details> <summary>rules/drizzle-orm-typescript-cursorrules-prompt-file/.cursorrules (1)</summary><blockquote> `1-356`: **Comprehensive Drizzle ORM guidance with accurate patterns.** The cursorrules file provides thorough coverage of Drizzle ORM best practices, including schema design, query patterns, migrations, and the repository pattern. The code examples correctly demonstrate type-safe database operations. </blockquote></details> <details> <summary>rules/hono-typescript-cloudflare-cursorrules-prompt-file/.cursorrules (1)</summary><blockquote> `1-256`: **Well-crafted Hono + Cloudflare Workers guidance.** The cursorrules file provides excellent coverage of edge-first API development with Hono v4.x. The examples correctly demonstrate Cloudflare bindings (D1, KV, R2), middleware patterns, and type-safe route handlers with Zod validation. </blockquote></details> <details> <summary>rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md (2)</summary><blockquote> `1-7`: **LGTM! Clear introduction and overview.** The title, description, and overview effectively introduce the Hono TypeScript Cloudflare Workers Cursor Rules with appropriate context and a helpful link to the official documentation. --- `9-17`: **No changes required—versions are accurate and current.** The Tech Stack section correctly specifies Hono v4.x and TypeScript 5.x. As of December 2025, Hono's latest stable release is v4.10.6 and TypeScript's latest stable is 5.9, confirming that both version ranges in the README are accurate and appropriate for documentation. </blockquote></details> <details> <summary>rules/remix-react-typescript-cursorrules-prompt-file/README.md (1)</summary><blockquote> `1-7`: **LGTM! Clear introduction and overview.** The title, description, and overview effectively introduce the Remix React TypeScript Cursor Rules with appropriate context and a helpful link to the official documentation. </blockquote></details> <details> <summary>rules/remix-react-typescript-cursorrules-prompt-file/.cursorrules (6)</summary><blockquote> `1-23`: **LGTM! Comprehensive introduction and tech stack definition.** The core expertise and tech stack sections provide a clear foundation for the Cursor Rules, properly defining the scope and technologies covered. --- `139-178`: **LGTM! Excellent demonstration of deferred data loading.** The example clearly shows how to use `defer` for parallel data loading with proper Suspense boundaries, which is a key Remix pattern for improving perceived performance. --- `180-227`: **LGTM! Solid form validation pattern.** The example demonstrates proper integration of Zod schema validation with Conform for type-safe, progressive form handling—a best practice for Remix applications. --- `273-301`: **LGTM! Well-structured resource route example.** The example demonstrates proper API endpoint patterns with appropriate HTTP method checks, query parameter handling, and cache headers. --- `303-325`: **LGTM! Effective optimistic UI pattern.** The example clearly demonstrates how to use `useFetcher` for optimistic UI updates, improving perceived performance by immediately reflecting user actions. --- `327-393`: **LGTM! Comprehensive error handling and best practices guidance.** The error handling patterns, performance optimizations, key principles, and anti-patterns provide excellent guidance for building robust Remix applications. </blockquote></details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
| test('should throw on duplicate email', () => { | ||
| expect(async () => { | ||
| await createUser({ email: 'test@example.com', name: 'Another' }) | ||
| }).toThrow() | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Async throw assertion won't work as expected.
Using expect(async () => {...}).toThrow() doesn't properly handle async rejections. The test will pass even if no error is thrown because the async function returns a Promise.
- test('should throw on duplicate email', () => {
- expect(async () => {
- await createUser({ email: 'test@example.com', name: 'Another' })
- }).toThrow()
+ test('should throw on duplicate email', async () => {
+ expect(
+ createUser({ email: 'test@example.com', name: 'Another' })
+ ).rejects.toThrow()
})📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| test('should throw on duplicate email', () => { | |
| expect(async () => { | |
| await createUser({ email: 'test@example.com', name: 'Another' }) | |
| }).toThrow() | |
| }) | |
| test('should throw on duplicate email', async () => { | |
| expect( | |
| createUser({ email: 'test@example.com', name: 'Another' }) | |
| ).rejects.toThrow() | |
| }) |
🤖 Prompt for AI Agents
In rules/bun-typescript-runtime-cursorrules-prompt-file/.cursorrules around
lines 249 to 253, the test uses expect(async () => { await createUser(...)
}).toThrow(), which does not handle async rejections; change the test to
properly assert an async throw by making the test async (or returning the
assertion) and using expect(createUser({ email: ..., name: ...
})).rejects.toThrow() (or await expect(createUser(...)).rejects.toThrow()) so
the Promise rejection is correctly asserted.
rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md
Outdated
Show resolved
Hide resolved
| ## Tech Stack | ||
|
|
||
| - **Framework:** Remix v2.x | ||
| - **UI Library:** React 18+ | ||
| - **Language:** TypeScript 5.x (strict mode) | ||
| - **Styling:** Tailwind CSS, CSS Modules | ||
| - **Validation:** Zod, Conform | ||
| - **Database:** Prisma, Drizzle ORM | ||
| - **Testing:** Vitest, Playwright |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
latest stable version of Remix framework React meta 2024 2025
💡 Result:
Latest stable Remix (framework) release: v2.17.0 — released July 25, 2025. [1]
Note: Remix functionality has been merged into React Router v7 (“framework mode”); see the Remix announcement for details. [2]
Sources:
- Remix changelog (v2.17.0 release). [1]
- Remix blog: "Wake up, Remix!" (merging with React Router v7). [2]
🌐 Web query:
latest stable version of React JavaScript library 2024 2025
💡 Result:
- Latest stable in 2024: React 19.0 — stable release published December 5, 2024. [1]
- Latest stable in 2025 (current): React 19.2 — released October 1, 2025. [2]
Sources:
[1] React v19 announcement (React blog, Dec 5 2024).
[2] React 19.2 release (React blog, Oct 1 2025).
🌐 Web query:
latest stable version of TypeScript 2024 2025
💡 Result:
The latest stable TypeScript release is 5.9 (released August 1, 2025). [1][2]
Sources:
[1] TypeScript blog — "Announcing TypeScript 5.9".
[2] npm / release listings showing 6.0 as development/nightly builds (not stable).
Update React version specification to reflect current stable releases.
The README specifies "React 18+" but React 19.x is now stable (19.2 as of October 2025). Update to "React 19+" or "React 18+" if intentionally targeting older versions. Remix v2.x (current: v2.17.0) and TypeScript 5.x (current: 5.9) remain current. Consider also noting that Remix v2 functionality has merged into React Router v7 framework mode, which may affect the project's tech stack guidance.
🤖 Prompt for AI Agents
In rules/remix-react-typescript-cursorrules-prompt-file/README.md around lines 9
to 17, the tech stack lists "React 18+" which is outdated; update the React
entry to "React 19+" (or "React 18+" only if you deliberately intend to support
older releases), and add a brief note that Remix v2 functionality has been
merged into React Router v7 framework mode (or mention the current Remix v2
version if you want to keep historical context); keep the rest of the stack
as-is and ensure the version notation matches the project's compatibility
targets.
- Fix variable redeclaration in Bun file I/O example (file -> metaFile) - Fix async test assertion to use rejects.toThrow() - Add missing useRouteError, isRouteErrorResponse imports in Remix - Add SESSION_SECRET validation before use - Add language identifiers to README code blocks
🚀 New Contributions
This PR adds 4 new high-quality cursorrules for trending technologies that are currently missing from the repository:
Added Rules:
hono-typescript-cloudflare-cursorrules-prompt-filedrizzle-orm-typescript-cursorrules-prompt-fileremix-react-typescript-cursorrules-prompt-filebun-typescript-runtime-cursorrules-prompt-fileWhy These Technologies?
Each
.cursorrulesFile Includes:Checklist:
technology-focus-cursorrules-prompt-file.cursorrulesandREADME.mdSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.