Skip to content

Commit

Permalink
chore: remove .cursorrules and use .cursor/rules
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Feb 10, 2025
1 parent 5f3d86d commit 6f3f65d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .cursorrules → .cursor/rules/general.mdc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: General Rules
globs:
---

## General

Expand All @@ -22,10 +26,7 @@
## Code Style

- Use TypeScript.
- Make sure the created files are ending with a new line at the end of the file.
- File names should be in lowercase with dash separators.
- Do not use specifiers for `fs` and `path` modules.
- Do use `pathe` instead of `path` module for windows compatibility.
- Test. 1) Use vitest for test cases, not jest. 2) Test cases should be in the same file as the code that is being tested. e.g. `foo.test.ts` for `foo.ts`. 3) Do use `test()` instead of `describe() + it()` for test cases.
- Use `printWidth: 80, singleQuote: true, trailingComma: all, indent_style: space, indent_width: 2` for code formatting.
- Api, commands and config in README.md should be ordered alphabetically.
- Test. 1) Use vitest for test cases, not jest. 2) Test cases should be in the same file as the code that is being tested. e.g. `foo.test.ts` for `foo.ts`.

8 changes: 8 additions & 0 deletions .cursor/rules/test.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
description: Rules for test files
globs: *.test.ts, *.test.tsx, *.test.js, *.test.jsx
---

# Your rule content

- Do use `test()` instead of `describe() + it()` for test cases.
11 changes: 11 additions & 0 deletions .cursor/rules/typescript.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
description: Rules for TypeScript files
globs: *.ts, *.tsx, *.js, *.jsx
---

# Your rule content

- Files are ending with a new line at the end of the file.
- Do not use specifiers for `fs` and `path` modules.
- Do use `pathe` instead of `path` module for windows compatibility.
- Use `printWidth: 80, singleQuote: true, trailingComma: all, indent_style: space, indent_width: 2` for code formatting.

0 comments on commit 6f3f65d

Please sign in to comment.