Skip to content

chore: update CodeRabbit config for React/Vite SPA and Jest#159

Open
Atharva0506 wants to merge 1 commit intoStabilityNexus:mainfrom
Atharva0506:fix-coderabbit-config
Open

chore: update CodeRabbit config for React/Vite SPA and Jest#159
Atharva0506 wants to merge 1 commit intoStabilityNexus:mainfrom
Atharva0506:fix-coderabbit-config

Conversation

@Atharva0506
Copy link
Copy Markdown
Contributor

@Atharva0506 Atharva0506 commented Apr 12, 2026

Addressed Issues:

Fixes #158

Screenshots/Recordings:

N/A This is a configuration change to .coderabbit.yaml, so there are no UI changes to display. (Please see the original issue description for a screenshot demonstrating the incorrect CodeRabbit feedback before this fix).

Additional Notes:

  • Context: The previous .coderabbit.yaml was heavily tailored towards a Next.js / React Native monorepo, which was causing the bot to suggest incorrect directives (like "use client") and enforce unnecessary TypeScript typing on our standard JavaScript codebase.
  • Key Changes:
    • Explicitly instructed CodeRabbit that this is a Vite/React Single Page Application (SPA) written in JavaScript, actively discouraging Next.js and TypeScript-specific suggestions.
    • Added instructions to expect and enforce the use of Jest alongside standard React testing libraries (@testing-library/react), as requested by the mentors.
    • Disabled unused backend/mobile linters (swiftlint, phpstan, detekt) to optimize the bot's processing speed and review focus.
    • Cleaned up irrelevant mobile/expo folder exclusions (android/, ios/, etc.) from the path filters.

AI Usage Disclosure:

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact. AI slop is strongly discouraged and may lead to banning and blocking. Do not spam our repos with AI slop.

Check one of the checkboxes below:

  • This PR does not contain AI-generated code at all.
  • This PR contains AI-generated code. I have read the AI Usage Policy and this PR complies with this policy. I have tested the code locally and I am responsible for it.

I have used the following AI models and tools: TODO

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • Chores
    • Updated code review configuration settings to optimize file analysis scope, patterns, and coverage areas throughout the project
    • Refined the selection and settings of active static analysis tools for improved project alignment and overall efficiency
    • Adjusted code review guidance recommendations to better align with current development standards, practices, and specific project requirements

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 12, 2026

Warning

Ignoring CodeRabbit configuration file changes. For security, only the configuration from the base branch is applied for open source repositories.

Walkthrough

The .coderabbit.yaml configuration file is updated to align CodeRabbit's code review context with the project's actual tech stack. The changes remove Next.js/TypeScript/React Native rules, disable unnecessary backend/mobile linters (swiftlint, phpstan, detekt), clean up path filters to exclude only build artifacts (node_modules, dist), and replace guidance with React/Vite/JavaScript standards.

Changes

Cohort / File(s) Summary
CodeRabbit Configuration
.coderabbit.yaml
Updated path_filters by removing native build directory exclusions (android, ios, .expo, .expo-shared); disabled swiftlint, phpstan, and detekt linters. Changed path_instructions and test-file globs from TypeScript patterns to JavaScript-only patterns. Replaced NextJS/TypeScript-centric guidance (use client directives, type import conventions) with JavaScript/React Vite SPA guidance. Updated test library references from react-native to standard Jest and @testing-library/react.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • PR #125: Introduces the initial .coderabbit.yaml configuration that this PR directly refactors to match the actual React + Vite JavaScript stack instead of the previously assumed Next.js/TypeScript/React Native setup.

Suggested labels

documentation

Poem

🐰 Hop, hop! The config's been refined,
No more Swift complaints for Android kind,
Just Vite and React, pure JavaScript dreams,
CodeRabbit now speaks in the right review schemes!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: updating CodeRabbit configuration for React/Vite SPA with Jest testing.
Linked Issues check ✅ Passed All objectives from issue #158 are addressed: TypeScript rules removed, Next.js/React Native rules stripped, JavaScript/Vite context applied, test libraries updated to Jest/@testing-library/react, and unused backend/mobile linters disabled.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the linked issue #158 objectives; no extraneous modifications or unrelated configuration updates were introduced.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Atharva0506 Atharva0506 marked this pull request as ready for review April 12, 2026 07:16
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.coderabbit.yaml (1)

177-186: ⚠️ Potential issue | 🟡 Minor

Leftover Expo/React Native security guidance should be updated.

Line 179 references expo-secure-store, which is a React Native/Expo-specific package not applicable to a Vite/React web SPA. This appears to be a leftover from the previous React Native configuration that contradicts the PR's objective to remove such references.

Consider updating to web-appropriate guidance:

Proposed fix
         Security:
         - No exposed API keys or sensitive data
-        - Use expo-secure-store for sensitive storage
-        - Validate deep linking configurations
+        - Use secure browser storage practices (avoid storing secrets in localStorage)
+        - Validate client-side routing configurations
         - Check for common security vulnerabilities such as:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.coderabbit.yaml around lines 177 - 186, The Security section still
references the Expo/React Native package expo-secure-store which is incorrect
for a Vite/React web SPA; update the Security bullet list (the "Security:"
block) to remove the expo-secure-store mention and replace it with
web-appropriate guidance such as recommending HttpOnly/secure cookies or browser
sessionStorage/localStorage considerations, using the Web Crypto API for
client-side cryptography, validating deep link/config routes, enforcing CSP and
secure headers, and scanning for insecure dependencies and common web attacks
(SQLi, XSS, CSRF); ensure the change targets the same "Security" block in
.coderabbit.yaml so the leftover RN-specific reference is fully removed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In @.coderabbit.yaml:
- Around line 177-186: The Security section still references the Expo/React
Native package expo-secure-store which is incorrect for a Vite/React web SPA;
update the Security bullet list (the "Security:" block) to remove the
expo-secure-store mention and replace it with web-appropriate guidance such as
recommending HttpOnly/secure cookies or browser sessionStorage/localStorage
considerations, using the Web Crypto API for client-side cryptography,
validating deep link/config routes, enforcing CSP and secure headers, and
scanning for insecure dependencies and common web attacks (SQLi, XSS, CSRF);
ensure the change targets the same "Security" block in .coderabbit.yaml so the
leftover RN-specific reference is fully removed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: c803c084-3523-4101-b146-43f2c20ce259

📥 Commits

Reviewing files that changed from the base of the PR and between 7a2e7ee and be317a7.

📒 Files selected for processing (1)
  • .coderabbit.yaml

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.

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

1 participant