> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coderabbit.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# React Native and Expo example configuration

> A commented .coderabbit.yaml for a React Native app built with Expo: path filters for native and build output, and review instructions for app code, Expo configuration, tests and assets.

This example configures CodeRabbit for a React Native app built with Expo. It uses schema V2. It skips native project folders and build output, runs a description check, and gives review instructions for app code, `app.json`, `eas.json`, `metro.config.js`, tests and assets. Copy it to the root of your repository as `.coderabbit.yaml` and adjust the paths and instructions to your project.

```yaml .coderabbit.yaml theme={null}
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
# The line above enables IDE autocompletion for this file

# Language for CodeRabbit's review comments
language: en

# Enable early-access features
early_access: true

chat:
  # Let CodeRabbit reply in PR comments without requiring an @coderabbitai mention
  auto_reply: true

reviews:
  auto_review:
    # Automatically trigger reviews when PRs are opened or updated
    enabled: true
    # Skip auto-review if PR title contains these keywords
    ignore_title_keywords:
      - "WIP"
    # Don't auto-review draft PRs
    drafts: false
    # Also auto-review PRs that target these branches (the default branch is always included).
    # Entries are regular expressions, so anchor them to match whole branch names
    base_branches:
      - "^main$"
      - "^develop$"

  # Add a high-level summary of the changes to the PR description
  high_level_summary: true

  # Generate sequence diagrams for complex code flows
  sequence_diagrams: true

  # Don't include poems in reviews (fun feature, but keeping it professional)
  poem: false

  # Post review status messages in the walkthrough, for example when a review is skipped
  review_status: true

  # Keep the walkthrough section expanded by default
  collapse_walkthrough: false

  # Include a summary of the changed files in the walkthrough
  changed_files_summary: true

  # Don't request changes or approve automatically (just leave comments)
  auto_approvals:
    enabled: false

  # Pre-merge checks to enforce before merging PRs
  pre_merge_checks:
    description:
      # Validate that PR has a proper description
      mode: warning # Options: off, warning, error

  # Exclude these paths from reviews (build artifacts and dependencies)
  path_filters:
    - "!**/node_modules/**" # npm dependencies
    - "!**/android/**" # Native Android build files
    - "!**/ios/**" # Native iOS build files
    - "!**/.expo/**" # Expo build cache
    - "!**/.expo-shared/**" # Expo shared config
    - "!**/dist/**" # Build output

  # Custom review instructions for specific file patterns
  path_instructions:
    # TypeScript/JavaScript files - main app code
    - path: "**/*.{ts,tsx,js,jsx}"
      instructions: |
        Mobile & Expo best practices:
        - Proper use of Expo APIs and hooks (useRouter, useFonts, useAssets)
        - Accessibility: touch targets min 44x44, screen reader support
        - Safe area handling and platform-specific code (iOS vs Android)
        - Memory leaks in useEffect and event listeners

        Performance:
        - Use FlatList/SectionList for lists (never ScrollView with .map)
        - StyleSheet.create instead of inline styles
        - React.memo, useMemo, useCallback where appropriate

        TypeScript:
        - Avoid 'any', use explicit types
        - Prefer 'import type' for type imports

        Security:
        - No exposed API keys or sensitive data
        - Use expo-secure-store for sensitive storage
        - Validate deep linking configurations

        Internationalization:
        - User-visible strings should be externalized to resource files (i18n)

    # Expo app configuration
    - path: "app.json"
      instructions: |
        Review Expo configuration for:
        - Proper app versioning (version and build numbers in sync)
        - Required permissions are justified and minimal
        - Splash screen and icon configurations are complete
        - Deep linking schemes are properly configured
        - EAS build configuration is production-ready
        - No exposed secrets or API keys in configuration

    # EAS (Expo Application Services) build configuration
    - path: "eas.json"
      instructions: |
        Review EAS Build/Submit configuration for:
        - Environment-specific configurations (development, preview, production)
        - Proper credential management
        - Build profiles are optimized for their purpose
        - iOS bundle identifiers and Android package names are correct
        - Distribution settings align with deployment strategy

    # Metro bundler configuration (React Native's JavaScript bundler)
    - path: "metro.config.js"
      instructions: |
        Review Metro bundler configuration for:
        - Asset extensions are properly registered
        - Transformer configuration is optimal for project needs
        - Source map generation is appropriate for environment
        - No security issues with resolver configuration

    # Test files
    - path: "**/*.test.{ts,tsx,js,jsx}"
      instructions: |
        Review test files for:
        - Comprehensive coverage of React Native component behavior
        - Proper use of @testing-library/react-native
        - Mock implementations for Expo modules and native APIs
        - Async behavior is properly tested
        - Accessibility testing is included

    # Asset files (images, fonts, etc.)
    - path: "assets/**/*"
      instructions: |
        Review asset files for:
        - Image optimization (size and format appropriate for mobile)
        - Proper @2x and @3x variants for different screen densities
        - SVG assets are optimized
        - Font files are licensed and optimized
```

## What's next

> [card] [Review instructions](https://docs.coderabbit.ai/pr-reviews/review-instructions.md)
>
> Write and scope the instructions this example sets in `path_instructions`.

> [card] [Which files are reviewed](https://docs.coderabbit.ai/pr-reviews/which-files.md)
>
> Change the `path_filters` that keep native and build folders out of reviews.

> [card] [Control when reviews run](https://docs.coderabbit.ai/pr-reviews/when-reviews-run.md)
>
> Tune the `auto_review` settings: drafts, title keywords and base branches.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.