From a25f5f9f158a2661739ef8af886a0f58206a4efc Mon Sep 17 00:00:00 2001 From: Rahul Barwal Date: Mon, 31 Mar 2025 14:50:55 +0530 Subject: [PATCH] feat: Add cursor rules and configuration files (#39981) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Introduced a new directory for cursor-specific rules and behaviors, including commit message guidelines and workspace rules for derived files and Cypress tests. This enhances the consistency and clarity of our development practices. Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="" ### :mag: Cypress test results > [!CAUTION] > If you modify the content in this section, you are likely to disrupt the CI result for your PR. ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **Documentation** - Expanded project guidelines to clarify best practices for team communications, workspace organization, and testing procedures—enhancing internal coordination and overall product quality. --- .cursor/README.md | 27 +++++++++++++++++++++++++++ .cursor/rules.json | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 .cursor/README.md create mode 100644 .cursor/rules.json diff --git a/.cursor/README.md b/.cursor/README.md new file mode 100644 index 0000000000..4cedaba667 --- /dev/null +++ b/.cursor/README.md @@ -0,0 +1,27 @@ +# Cursor Rules + +This directory contains configuration for cursor-specific rules and behaviors. + +## Commit Message Rules + +- Messages must be concise and single-line +- Must start with a verb (e.g., adds, removes, updates) +- For significant changes: + + ``` + Heading + + Detailed description + ``` + +## Workspace Rules + +### Derived Files + +- Use `/*** */` for comments instead of `//` + +### Cypress Tests + +- Run command: `yarn cypress run --browser chrome --headless --spec {fileName}` +- Execute from: `app/client` directory +- File paths should be relative to `app/client` diff --git a/.cursor/rules.json b/.cursor/rules.json new file mode 100644 index 0000000000..85ce6771d3 --- /dev/null +++ b/.cursor/rules.json @@ -0,0 +1,42 @@ +{ + "commitRules": { + "style": { + "concise": true, + "singleLine": true, + "format": { + "prefix": "verb", + "allowedPrefixes": [ + "adds", + "removes", + "updates", + "fixes", + "refactors", + "implements", + "improves" + ], + "bigChanges": { + "format": "heading + description", + "separator": "\n\n" + } + } + } + }, + "workspaceRules": { + "derivedFiles": { + "commentStyle": { + "forbidden": "//", + "required": "/*** */" + } + }, + "cypressTests": { + "runCommand": { + "directory": "app/client", + "command": "yarn cypress run --browser chrome --headless --spec {fileName}", + "filePathFormat": { + "input": "app/client/cypress/e2e/...", + "usage": "cypress/e2e/..." + } + } + } + } +}