AI 编程/Cursor
C

Cursor

AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。

← Skills

TypeScript 严谨实现规则

约束 Cursor 在 TS 项目中优先类型安全、小 diff 和补测试。

Cursor RuleCursor Rules / .cursor/rules

description: Prefer typed, small, test-backed TypeScript changes globs: **/*.{ts,tsx} alwaysApply: false

TypeScript implementation

  • Do not use any. Prefer unknown + narrowing.
  • Keep diffs small; do not refactor unrelated files.
  • When changing behavior, add or update a unit test.
  • Match existing import style and path aliases.
  • Explain the risk of the change in one short paragraph.