Cursor rule
.cursor/rules/vue.mdc[object Object]
Cursor rules
Quality
44/100
Scores the file, not the repository.Length
160 words
12 headings · 0 code blocksRepository
1
— · pushed 337 days agoLast changed
3 days ago
First indexed 3 days ago.123456---7description: 现代Web应用的Vue.js最佳实践与模式8globs: **/*.vue, **/*.ts, components/**/*9---1011# Vue.js 最佳实践1213## 组件结构14- 优先使用组合式API(Composition API)而非选项式API(Options API)15- 保持组件小巧且职责单一16- 合理集成TypeScript17- 实现严谨的props验证18- 规范声明emit事件19- 保持模板逻辑简洁2021## 组合式API22- 合理使用ref与reactive23- 规范实现生命周期钩子24- 用组合式函数(Composables)封装可复用逻辑25- 保持setup函数简洁26- 规范使用计算属性(computed)27- 实现合理的监听器(watchers)2829## 状态管理30- 使用Pinia进行状态管理31- 保持存储模块化32- 规范状态组合方式33- 实现合理的actions34- 规范使用getters35- 正确处理异步状态3637## 性能优化38- 合理使用组件懒加载39- 实现有效缓存策略40- 规范使用计算属性41- 避免不必要的监听器42- 合理选择v-show与v-if43- 规范管理key值4445## 路由管理46- 正确使用Vue Router47- 实现规范的导航守卫48- 规范使用路由元信息(meta字段)49- 正确处理路由参数50- 实现组件懒加载51- 规范使用导航方法5253## 表单处理54- 合理使用v-model双向绑定55- 实现严谨的表单验证56- 规范处理表单提交57- 显示合理的加载状态58- 实现完善的错误处理59- 规范表单重置逻辑6061## TypeScript集成62- 规范定义组件类型63- 实现严谨的props类型64- 规范声明emit事件类型65- 处理合理的类型推断66- 规范组合式函数类型67- 实现严谨的存储类型6869## 测试规范70- 编写规范的单元测试71- 实现严谨的组件测试72- 正确使用Vue Test Utils73- 规范测试组合式函数74- 实现有效的模拟(Mocking)75- 测试异步操作7677## 通用最佳实践78- 遵循Vue风格指南79- 使用规范的命名约定80- 保持组件组织有序81- 实现完善的错误处理82- 规范事件处理逻辑83- 文档化复杂逻辑8485## 构建与工具链86- 使用Vite作为开发工具87- 配置合理的构建设置88- 规范环境变量管理89- 实现有效的代码分割90- 规范资源处理方式91- 配置合理的优化策略9293## CSS样式要求94- 所有样式必须使用UnoCSS框架生成,禁止直接编写原生CSS代码
Also in lzyyzznl/all_in_one_search
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| lzyyzznl/all_in_one_search.cursor/rules/clean-code.mdc · 1 | Cursor rules | no sections | 30/100 | 3 days ago | |
| lzyyzznl/all_in_one_search.cursor/rules/common.mdc · 1 | Cursor rules | no sections | 50/100 | 3 days ago | |
| lzyyzznl/all_in_one_search.cursor/rules/git.mdc · 1 | Cursor rules | typesgit | 58/100 | 3 days ago | |
| lzyyzznl/all_in_one_search.cursor/rules/quality-rule.mdc · 1 | Cursor rules | no sections | 30/100 | 3 days ago | |
| lzyyzznl/all_in_one_search.cursor/rules/tailwind.mdc · 1 | Cursor rules | ui | 44/100 | 3 days ago | |
| lzyyzznl/all_in_one_search.cursor/rules/ts.mdc · 1 | Cursor rules | types | 44/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
