找回密码
 注册免广告
搜索
免绑卡永久免费服务器 🌐Neverless 交易所带个人 IBAN 的 OKX 交易所
熊猫速汇 50 元券 🔥MyFin 5 欧元羊毛 🔥人人必备的 Wise 💳
英、德、香港转运 📦,送 $25最便宜的 eSIM 流量手机号 📱数字货币银行卡,注册送 7 美元💲
查看: 80|回复: 1

[其它] 分享一个 cursor mdc 配置

[复制链接]
HelloWorld 发表于 昨天 15:05 | 显示全部楼层 |阅读模式

注册免广告

您需要 登录 才可以下载或查看,没有账号?注册免广告

×

.cursor/rules/coding-preference.mdc
  1. # Coding pattern preferences

  2. – Always prefer simple solutions  
  3. – Avoid duplication of code whenever possible, which means checking for other areas of the codebase that might already have similar code and functionality  
  4. – Write code that takes into account the different environments: dev, test, and prod  
  5. – You are careful to only make changes that are requested or you are confident are well understood and related to the change being requested  
  6. – When fixing an issue or bug, do not introduce a new pattern or technology without first exhausting all options for the existing implementation. And if you finally do this, make sure to remove the old implementation afterwards so we don’t have duplicate logic.  
  7. – Keep the codebase very clean and organized  
  8. – Avoid writing scripts in files if possible, especially if the script is likely only to be run once  
  9. – Avoid having files over 200–300 lines of code. Refactor at that point.  
  10. – Mocking data is only needed for tests, never mock data for dev or prod  
  11. – Never add stubbing or fake data patterns to code that affects the dev or prod environments  
  12. – Never overwrite my .env file without first asking and confirming
复制代码
如果帖子/回帖帮助到你,请给作者评分/点赞
smallwhite 发表于 昨天 20:07 | 显示全部楼层
没有癌症pua没有灵魂。
如果帖子/回帖帮助到你,请给作者评分/点赞
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册免广告

本版积分规则

排行榜|意见建议|黑名单|数字居民论坛

GMT+8, 2025-5-9 21:53

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表