Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Welcome, Copilot! This file provides context and coding guidelines for assisting with this React Native project. Instructions are divided
into two sections: General Instructions and Project-Specific Instructions. General Instructions are shared across all projects within the
RN team and include best practices applicable across projects. These should be updated via PRs to RN project template.

When thinking of solutions, combine general instructions and project-specific instructions. However, project-specific instructions take
precedence and can override general instructions. Project-specific instructions are tailored to the specific needs of the project and are
updated throughout the development process.

# ------------------------ GENERAL INSTRUCTIONS ------------------------

### About

- This is a React Native app built with Expo and TypeScript.
- The project uses pnpm as its package manager.

### Code Quality Tools

- The project uses ESLint and Prettier for auto-formatting and enforcing coding rules.
- Write unit tests using `jest` and `@testing-library/react-native`.
- Write E2E tests using Maestro.

### Code Style

- Prefer destructuring for props and objects.
- Use modern TypeScript syntax and features.
- Use arrow functions for components.
- Avoid deprecated or legacy APIs.
- Use `async/await` for asynchronous operations.

### Preferred Modules and Libraries

- Use `expo-router` for navigation.
- Prefer the usage of Expo libraries when available.

### Chat and Communication

- When suggesting code changes in chat, ensure imports are included at the top of the file.

### Animations

- Use react-native-reanimated and Skia for animations and drawing.
- Avoid thread jumping in animations to ensure smooth performance. This means, try to access .value of sharedValue in worklets, not on JS thread.

### Avoid

- Avoid using `any` types. Always use specific types or interfaces.
- Avoid nesting ternary expressions.

# ------------------- PROJECT-SPECIFIC INSTRUCTIONS -----------------------
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added some basic setup based on wha we have in project and what you shared @pchalupa . But its all open for discussion what should be actually shared across team

Loading