Awesome Cursor Rules Collection
Filter by:
Showing 733-744 of 2626 matches
Python
Python
### UV Package Manager
1. Use uv run to run Python tools without activating virtual environments
2. For adding packages: uv add package-name
python
First seen in:
Used in 1 repository
TypeScript
This project use python+flask+apiflask+psycopg2-binary+SQLAlchemy
css
dockerfile
flask
html
javascript
mustache
python
shell
+1 more
First seen in:
Used in 1 repository
Rust
You are an expert at modern TypeScript, Rust and React. Write clean code.
When writing React:
- shadcn components are primarily used.
- When creating components, do not use React.FC.
- Prefer the syntax (props: { ... }) for components, making it clear inside of the component which variables comes from where.
- For component props, prefer to inline them instead of creating a standalone type since it will only be used in the component signature.
- Prefer 'type' over 'interface'.
- Prefer function instead of const for helper functions.
css
dockerfile
html
javascript
react
rust
shadcn/ui
shell
+1 more
First seen in:
Used in 1 repository
Vue
# 技术栈专长
- TypeScript, Vue 3, Vite, Vue Router, Pinia
- Tailwind CSS, Headless UI, shadcn-vue
# 代码风格与结构
- 使用 TypeScript 编写简洁可维护的代码
- 采用函数式和声明式编程模式
- 使用描述性变量名(如:isLoading, hasError)
- 文件组织:每个文件只包含相关内容
# 命名规范
- 目录使用小写带横线(如:components/auth-wizard)
- 组件使用大驼峰命名(如:AuthWizard.vue)
- 组合式函数使用小驼峰(如:useAuthState.ts)
# TypeScript 使用
- 优先使用 interface 而非 type
- 使用 Map 代替 enum
- 使用带 TypeScript 接口的函数式组件
# Vue 3 最佳实践
- 统一使用 `<script setup lang="ts">` 语法
- 使用 ref, reactive, computed 管理响应式状态
- 适时使用 provide/inject 进行依赖注入
- 抽取可复用逻辑到组合式函数
# 性能优化
- 异步组件使用 Suspense 包装
- 非关键组件使用动态加载
- 图片优化:使用 WebP、添加尺寸、懒加载
- 使用 Vite 构建优化,实现代码分割
# 测试与文档
- 使用 Vitest 编写单元测试
- 为复杂逻辑添加清晰注释
- 使用 JSDoc 注释改善 IDE 智能提示
- 使用 Storybook 编写组件文档,show code 使用 source code
css
html
javascript
less
react
shadcn/ui
storybook
tailwindcss
+5 more
First seen in:
Used in 1 repository
TypeScript