-
Notifications
You must be signed in to change notification settings - Fork 212
@W-18909894 - add cursor rules for creating components #2702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
snilakandan13
merged 15 commits into
feature/generated-project-cursor-rules
from
t/commerce/W-18909894/addCursorRules
Jul 14, 2025
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7ae5702
Added cursor rules
snilakandan13 c774939
Rules updated
snilakandan13 ebdd8a9
Rules updated
snilakandan13 702811b
Updated Readme document
snilakandan13 b299d4e
Updated rules
snilakandan13 a2bff8b
updated rules
snilakandan13 0f52866
Merge branch 'feature/pwa-developer-agent-only' of https://github.com…
snilakandan13 370178a
Cursor Rules for generating components
snilakandan13 b683539
Added MCP rules for Component creation
snilakandan13 a14dcef
Merge branch 'develop' of https://github.com/SalesforceCommerceCloud/…
snilakandan13 c1a87dd
Cursor rules and cleanup of tool
snilakandan13 3668dc9
Deleting from the monorepo
snilakandan13 647fcab
skip changelog
snilakandan13 b31f4d3
Added options for other
snilakandan13 310e504
Cursor rules for creating new component
snilakandan13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
.cursor/rules/storefront-development/component-generation-requirements.mdc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --- | ||
| description: USE when creating new components | ||
| globs: | ||
| alwaysApply: false | ||
| --- | ||
| # Component Generation Requirements | ||
|
|
||
| ## Process | ||
| 1. **Preferred** | ||
| - Ask user to provide the component name, purpose and requirements. | ||
| - Determine the appropriate component type (presentational, container, form, etc.). | ||
| - Collected component information must be displayed and asked for confirmation. | ||
| 2. **Default to Simple** - Start with minimal implementation | ||
| 3. DO NOT add extra features unless asked | ||
|
|
||
| ## General Rules | ||
| Create components at the components directory: `**/components/[component-name]/index.jsx` | ||
|
|
||
| ## Guidelines | ||
| **IMPORTANT** | ||
| - Use functional components with hooks | ||
| - Use PascalCase for component names | ||
| - Use kebab-case for directories | ||
| - Start simple, expand only if requested | ||
| - One main purpose per component | ||
|
|
||
|
|
||
|
|
||
|
|
29 changes: 29 additions & 0 deletions
29
packages/pwa-kit-create-app/assets/cursor-rules/component-generation-requirements.mdc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --- | ||
| description: USE when creating new components | ||
| globs: | ||
| alwaysApply: false | ||
| --- | ||
| # Component Generation Requirements | ||
|
|
||
| ## Process | ||
| 1. **Preferred** | ||
| - Ask user to provide the component name, purpose and requirements. | ||
| - Determine the appropriate component type (presentational, container, form, etc.). | ||
| - Collected component information must be displayed and asked for confirmation. | ||
| 2. **Default to Simple** - Start with minimal implementation | ||
| 3. DO NOT add extra features unless asked | ||
|
|
||
| ## General Rules | ||
| Create components at the components directory: `**/components/[component-name]/index.jsx` | ||
|
|
||
| ## Guidelines | ||
| **IMPORTANT** | ||
| - Use functional components with hooks | ||
| - Use PascalCase for component names | ||
| - Use kebab-case for directories | ||
| - Start simple, expand only if requested | ||
| - One main purpose per component | ||
|
|
||
|
|
||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.