Cursor rule
.cursor/rules/implementation-details.mdc[object Object]
Cursor rules
Quality
30/100
Scores the file, not the repository.Length
60 words
6 headings · 0 code blocksRepository
1
— · pushed 368 days agoLast changed
3 days ago
First indexed 3 days ago.123456# Vite Tagger 实现细节78## 核心实现910插件使用 [Babel](mdc:https:/babeljs.io) 解析JSX代码并使用 [estree-walker](mdc:https:/github.com/Rich-Harris/estree-walker) 遍历语法树,找到所有HTML元素并添加调试属性。1112主要处理流程在 [src/index.ts](mdc:src/index.ts) 的 `viteTagger` 函数中:13141. 解析配置选项152. 解析源代码为AST163. 遍历AST查找JSX元素174. 为符合条件的元素添加调试属性185. 返回修改后的代码1920## 关键处理逻辑2122### 元素内容提取2324元素内容提取逻辑位于 `transform` 方法中:25261. 提取元素的文本内容(递归处理嵌套元素)272. 提取元素的关键属性(placeholder、className、id、title、alt等)283. 构建content对象294. 当content为空对象时,不添加`data-component-content`属性3031### 3D元素过滤3233插件内置了 Three.js 和 Drei 元素列表,可以通过配置选项 `filter3DElements` 来控制是否过滤这些3D元素。3435## 测试3637[src/index.test.ts](mdc:src/index.test.ts) 包含了多个测试用例,验证插件的核心功能:38391. 测试文本内容提取402. 测试简单按钮处理413. 测试空内容元素不添加content属性42
Also in yan-labs/vite-tagger
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 |
|---|---|---|---|---|---|
| yan-labs/vite-tagger.cursor/rules/plugin-usage.mdc · 1 | Cursor rules | setup | 65/100 | 3 days ago | |
| yan-labs/vite-tagger.cursor/rules/project-overview.mdc · 1 | Cursor rules | test | 32/100 | 3 days ago | |
| yan-labs/vite-tagger.cursor/rules/recent-changes.mdc · 1 | Cursor rules | test | 35/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 |
