Prompt

lew-ui — Cursor Rules

by lewkamtao

AI Summary

A Cursor IDE rule set that enforces component development standards for a Vue3 UI library, ensuring consistent documentation practices and API updates across component modifications.

Install

# Download to your project root
curl -o .cursorrules "https://raw.githubusercontent.com/lewkamtao/lew-ui/main/.cursor/rules/base.mdc"

Description

A beautiful component library based on vue3

1. 组件修改后的文档更新要求

每次修改完组件内容后,必须同步更新以下内容: • 组件根目录的 MDC 文档:如果组件目录下存在 {componentName}.mdc 文件,需要更新文档中相关的 API 说明、注意事项、常见问题等内容 • 变更日志:在 MDC 文档的「变更日志」章节中添加本次修改的记录,包括版本号、变更内容、日期 示例: `markdown

6. 变更日志

| 版本 | 变更内容 | 日期 | |------|----------|------| | 1.1.0 | 新增 statusPlacement 属性,支持自定义状态指示器位置 | 2024-01-15 | | 1.0.0 | 初始版本 | 2024-01-01 | `

2. 文档生成规范

• ❌ 不需要生成总结文档:修改组件时,不要生成额外的总结性文档或变更说明文档 • ✅ 直接更新现有文档:在组件目录下的 MDC 文件中直接更新相关内容

3. 缺失文档的处理

如果当前组件目录下没有 MDC 文档(即不存在 {componentName}.mdc 文件),需要: • 按照 @.cursor/create-component-mdc.mdc 的规范生成完整的组件文档 • 将生成的 MDC 文档保存到组件根目录,命名为 {componentName}.mdc • 文档应包含:组件基础信息、快速开始、详细 API 说明、注意事项、常见问题与修复方案、变更日志等完整模块 组件目录结构示例: ` lib/components/general/avatar/ ├── index.ts ├── avatar.mdc # 组件文档(如不存在需创建) └── src/ ├── LewAvatar.vue └── props.ts `

Quality Score

B

Good

83/100

Standard Compliance78
Documentation Quality72
Usefulness75
Maintenance Signal100
Community Signal100
Scored Yesterday

GitHub Signals

Stars1.5k
Forks83
Issues9
Updated9d ago
View on GitHub

Trust & Transparency

Open Source — MIT

Source code publicly auditable

Verified Open Source

Hosted on GitHub — publicly auditable

Actively Maintained

Last commit 9d ago

1.5k stars — Strong Community

83 forks

My Fox Den

Community Rating

Works With

Cursor