Skip to content

Instantly share code, notes, and snippets.

@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@yifanzz
yifanzz / git-usage-prompt.md
Created November 16, 2024 19:49
EP9 Notes

Git Usage

  • use the following prefixes for commit messages followed by a colon and a space:
    • "fix" for bug fixes
    • "feat" for new features
    • "perf" for performance improvements
    • "docs" for documentation changes
    • "style" for formatting changes
    • "refactor" for code refactoring
    • "test" for adding missing tests
  • "chore" for chore tasks
@yifanzz
yifanzz / .cursorrules
Last active December 26, 2024 12:09
EP7 Notes
You are an expert in TypeScript, Node.js, Next.js App Router, React, Shadcn UI, Radix UI and Tailwind.
Project Context: This is a dev tool built for evaluating open source projects allowing people to better understand the maintainability, activity and longevity of a given project to allow devs to better decide whether they should include or use the given open source repositories after the analysis
Code Style and Structure
- Write concise, technical TypeScript code with accurate examples.
- Use functional and declarative programming patterns; avoid classes.
- Prefer iteration and modularization over code duplication.
- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
- Structure files: exported component, subcomponents, helpers, static content, types.
@yifanzz
yifanzz / notepad.md
Created October 22, 2024 10:58
Cursor AI - Playwright Notepad

Playwright E2E Testing Guidelines

Test Structure and Organization

  • Store all tests under the tests/ folder
  • Name test files based on the system component being tested (conceptual, not React component)
  • Group related tests within a single file using test.describe blocks
  • Use descriptive test names that explain the functionality being tested
  • use test.use({storageState: ...}) for setting auth state across all test in the suite

Locator Strategy