Skip to content
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

Add cursor rules #9268

Merged
merged 2 commits into from
Dec 31, 2024
Merged

Add cursor rules #9268

merged 2 commits into from
Dec 31, 2024

Conversation

FelixMalfait
Copy link
Member

Add rules for AI code editor

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Added comprehensive development standards documentation in .cursorrules file to guide AI code editors in maintaining consistent code quality across the Twenty project.

  • Established strict styling rules requiring @emotion/styled with theme objects and proper component prefixing
  • Defined TypeScript standards enforcing strict typing, type inference, and string literals over enums
  • Set React patterns mandating functional components, named exports, and minimal useEffect usage
  • Outlined state management architecture using Recoil atoms and Apollo Client for GraphQL
  • Specified testing requirements across backend (Jest/Supertest), frontend (Jest/Storybook/MSW), and E2E (Playwright)

1 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

.cursorrules Outdated
- Queue: BullMQ
- Storage: S3/local filesystem
- Testing Backend: Jest, Supertest
- Testing Frontent: Jest, Storybook, MSW
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syntax: 'Frontent' is misspelled

- Early returns
- No nested ternaries
- No else-if
- Optional chaining over &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Optional chaining and && serve different purposes - this rule may lead to incorrect null checks

@FelixMalfait
Copy link
Member Author

Hey @lucasbordeau @Weiko could you please review / add relevant comments for backend / frontend?
I will also add this to Greptile to make the reviews more relevant (since it was decided to bring back Greptile)

@FelixMalfait FelixMalfait merged commit 09cdfaa into main Dec 31, 2024
15 checks passed
@FelixMalfait FelixMalfait deleted the add-cursor-rules branch December 31, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants