Skip to content

Refactor .coderabbit.yaml for React + Vite & Hardhat Compatibility #158

@Atharva0506

Description

@Atharva0506

The Issue

I was looking through .coderabbit.yaml config and realized it's heavily configured for a Next.js, React Native, and TypeScript monorepo. Since our frontend is purely a React + Vite application written in JavaScript, CodeRabbit is using the completely wrong context for its automated reviews.
This means the bot has been giving us bad feedback, complaining about missing TypeScript types, and asking for Next.js specific syntax that we simply don't need.

Proof of the issue:

In my recent export JSON/CSV PR (#138), CodeRabbit incorrectly told me to add a "use client" directive to my React code.

Image

What's wrong right now?

  1. TypeScript rules on JS code: The file tells the bot to enforce strict typing (like avoiding any and using import type). Since our frontend uses standard .jsx files, this causes the bot to leave irrelevant review comments.
  2. Next.js & React Native rules: It tells the bot to enforce "use client" and Next.js specific file structures. It also tells the tester to use @testing-library/react-native instead of standard web React testing libraries.
  3. Random unused tools are turned on: In the tools section, it has linters accidentally enabled for iOS (Swift), Android (Kotlin), and PHP. It's also ignoring mobile folders like ios/ and android/ which we don't even have in our repo.

fix

  • Strip out all the Next.js, React Native, and TypeScript rules from the config file.
  • Update the javascript rules so CodeRabbit knows it's reviewing a standard Vite/React SPA in JavaScript.
  • Turn off the useless backend/mobile linters (swiftlint, phpstan, detekt) to speed things up.
  • Clean up the file by removing the random mobile folder exclusions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions