Skip to content

Conversation

@RishabhS7
Copy link

@RishabhS7 RishabhS7 commented Dec 26, 2025

Summary

add in disclaimer on readme and cli

Jira Ticket

Summary by CodeRabbit

  • Documentation

    • Added development-use warning and production integration guidance to README.
  • Chores

    • Added startup warnings shown when the CLI starts and integrated runtime version checking.
    • Strengthened command validation and help behavior on startup.
    • Reorganized linting/test configuration to scope Jest rules to test files.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 26, 2025

📝 Walkthrough

Walkthrough

Adds development warning text to README, prints two yellow warnings at CLI startup, wires a versionCheck middleware into the yargs startup chain, enables stricter yargs command validation, and restructures ESLint settings in package.json (Jest rules moved into overrides). No functional public API changes.

Changes

Cohort / File(s) Summary
Documentation
README.md
Added two introductory warning lines indicating the CLI is for development use and recommending integrating the TrustVC library for production.
CLI entry point
src/index.ts
Imported chalk; added two yellow-colored development warnings printed before yargs setup; registered versionCheck as yargs middleware; enabled demandCommand, strict, and help(argv) for yargs.
ESLint / package config
package.json
Removed top-level Jest env and plugin extends; moved Jest environment and plugin:jest/all into an overrides block targeting test globs; adjusted parserOptions/settings (removed JSX/React detection) and disabled specific Jest rules inside the override.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped into README with caution bright,
A yellow whisper before the CLI's first light.
Middleware stitched and lint rules rearranged,
A dev-time flourish, neatly exchanged.
Cheers, little changes—gentle, clear, and spry!

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is incomplete; it lacks a detailed 'Changes' section and the 'Issues' section only contains a Jira link reference without explaining the connection to the changes. Expand the 'Changes' section with bullet points describing modifications to README.md and src/index.ts, and clarify how the changes address the Jira ticket TT-1112.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add disclaimer' is clear and directly reflects the main change across multiple files (README.md and src/index.ts), accurately summarizing the primary objective of the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-disclaimer

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.

Copy link

@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.

Actionable comments posted: 0

🧹 Nitpick comments (2)
README.md (1)

3-4: Clear development warning added.

The warning is prominent and well-placed at the top of the README. It aligns well with the runtime warnings added to the CLI.

Optional enhancement: Add link to TrustVC library

Consider adding a link to the TrustVC library documentation to help users find the production-ready alternative:

 > ⚠️ This CLI is for development work only. It is not recommended for production use.
-> For production, please integrate the TrustVC library.
+> For production, please integrate the [TrustVC library](https://github.com/TradeTrust/trustvc).
src/index.ts (1)

6-8: Development warnings appropriately placed.

The startup warnings are clear and align well with the README documentation. Placing them at the top level before yargs initialization ensures users see the warning immediately when the CLI is invoked, which is the correct behavior for a development-only tool.

The static analysis complaint about "should be done within a hook" appears to be a false positive—it's likely applying frontend framework rules (e.g., React hooks) to a Node.js CLI context where top-level execution is appropriate and intentional.

Optional enhancement: Add link to TrustVC library

Consider adding a URL or more context about the TrustVC library to help users find the production alternative:

 // Display development warning
 console.warn(chalk.yellow("\n⚠️  This CLI is for development work only. It is not recommended for production use."));
-console.warn(chalk.yellow("For production, please integrate the TrustVC library.\n"));
+console.warn(chalk.yellow("For production, please integrate the TrustVC library: https://github.com/TradeTrust/trustvc\n"));
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 210aee5 and cfcf004.

📒 Files selected for processing (2)
  • README.md
  • src/index.ts
🧰 Additional context used
🪛 GitHub Check: Linters / Code Lint
src/index.ts

[failure] 8-8:
This should be done within a hook


[failure] 7-7:
This should be done within a hook

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Tests / Run Tests
🔇 Additional comments (1)
src/index.ts (1)

3-3: No action required. The chalk package is properly included in the project's dependencies.

Copy link

@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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
package.json (1)

118-122: Remove the browser environment for a Node.js CLI tool.

The browser: true environment setting is inappropriate for a CLI tool that runs exclusively in Node.js. This setting tells ESLint that browser globals (like window, document, etc.) are available, which could lead to false negatives where browser-only APIs aren't flagged as errors.

🔎 Proposed fix
   "eslintConfig": {
     "parser": "@typescript-eslint/parser",
     "env": {
-      "browser": true
+      "node": true,
+      "es2020": true
     },
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cfcf004 and 41dabcd.

📒 Files selected for processing (1)
  • package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Tests / Run Tests
🔇 Additional comments (1)
package.json (1)

142-162: LGTM! Good refactor to scope Jest rules to test files.

Moving Jest-specific linting rules into an overrides block is a best practice. This ensures production code is linted without Jest rules while test files receive appropriate Jest-specific linting. The disabled rules (prefer-expect-assertions, no-hooks, prefer-strict-equal) are reasonable choices that prevent overly strict test linting.

@rongquan1 rongquan1 merged commit 25f1cb7 into master Dec 26, 2025
10 checks passed
@rongquan1 rongquan1 deleted the feat/add-disclaimer branch December 26, 2025 09:43
@github-actions
Copy link

🎉 This PR is included in version 3.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants