Skip to content

Conversation

@ryoppippi
Copy link
Owner

@ryoppippi ryoppippi commented Sep 18, 2025

Summary

Added comprehensive ESLint configuration to the docs package to enforce code quality and consistency across documentation files.

What Changed

  • ESLint Configuration: Added eslint.config.js with TypeScript and Markdown linting rules
  • Package Scripts: Added lint and format commands to package.json
  • Dependencies: Added ESLint and related plugins as dev dependencies
  • Code Quality: Applied ESLint auto-fixes across all documentation files
  • Documentation: Updated CLAUDE.md with ESLint usage guidelines
  • Ignores: Configured appropriate ignores for generated content and build artifacts

Why

The docs package previously lacked linting configuration, leading to:

  • Inconsistent code formatting across TypeScript files
  • Potential quality issues in documentation scripts
  • Missing standardization for Markdown content
  • No automated code quality checks in CI/CD pipeline

This change aligns the docs package with the rest of the monorepo's code quality standards.

Testing

  • ✅ ESLint configuration validates without errors
  • ✅ All existing TypeScript files pass linting
  • ✅ Markdown files are properly formatted
  • ✅ Build process continues to work correctly
  • ✅ Documentation generation remains functional

Files Modified

  • docs/eslint.config.js - New ESLint configuration
  • docs/package.json - Added ESLint dependencies and scripts
  • docs/CLAUDE.md - Updated with ESLint usage guidelines
  • docs/.vitepress/config.ts - Applied formatting fixes
  • docs/guide/*.md - Applied ESLint auto-fixes for consistency
  • docs/typedoc.config.ts - Formatting improvements
  • docs/update-api-index.ts - Code style fixes

Post-Change Workflow

The documentation now follows the same quality standards as other packages:

pnpm run format  # Auto-fix and format
pnpm typecheck   # Type checking  
pnpm run lint    # Linting validation

Related Issues

This change improves documentation maintainability and ensures consistent code quality across the entire monorepo.

Summary by CodeRabbit

  • Documentation

    • API Reference sidebar now dynamically lists entries for easier navigation.
    • Expanded Environment Variables guide: new default config path, precedence order, and shell-based examples; improved Log Levels table.
    • Clarified Directory Detection with an added project directory note.
    • Widespread readability updates across guides (tables, JSON blocks, spacing) without changing behavior.
  • Chores

    • Introduced docs linting/formatting workflow and ESLint configuration.
    • Minor configuration and formatting tidy-ups across documentation build settings.

Add comprehensive ESLint setup to the docs package to maintain
code quality and consistent formatting across documentation files.

Changes:
- Add @ryoppippi/eslint-config, eslint, and eslint-plugin-format dependencies
- Create eslint.config.js with markdown support and appropriate ignores
- Add lint and format scripts to package.json
- Document ESLint commands in CLAUDE.md
- Ignore update-api-index.ts script file with specific patterns

This enables automated linting and formatting for:
- TypeScript files (.ts, .tsx)
- Markdown files (.md) with code block validation
- Proper ignoring of generated content (api/, public/, .vitepress/dist)
- Script files with specific patterns excluded

The configuration uses @ryoppippi/eslint-config as the base with
markdown support enabled for documentation files. Generated API
documentation, public assets, and utility scripts are excluded
from linting to avoid false positives.

Original requirement: "Add ESLint configuration to the docs package
to maintain code quality and consistent formatting"
Apply comprehensive ESLint formatting fixes to improve code quality
and consistency across the documentation codebase.

Changes include:
- Fix import ordering and grouping in TypeScript files
- Standardize indentation and spacing (tabs vs spaces)
- Correct quote styles and trailing commas
- Format JSON configuration files consistently
- Add proper line breaks and list formatting in markdown
- Fix table formatting and alignment
- Ensure consistent code block formatting

Files affected:
- VitePress configuration and TypeScript files
- All guide documentation markdown files
- Configuration files (tsconfig.json, wrangler.jsonc, etc.)
- API generation scripts

These are automated fixes from @ryoppippi/eslint-config to ensure
consistent formatting without changing any functional behavior.
The fixes improve readability and maintain coding standards.

All changes are purely stylistic - no functional changes to
documentation content or build configuration.
Add <!-- eslint-skip --> comments before JSON code blocks containing
ellipsis syntax (...) in guide/json-output.md to prevent ESLint
parsing errors.

The ellipsis syntax used in documentation examples is not valid JSON
and causes ESLint's markdown parser to fail when trying to validate
these code blocks. The skip comments allow these examples to remain
as-is for documentation clarity while avoiding linting errors.

Changes:
- Add eslint-skip comments before JSON blocks with "..." syntax
- Apply standard ESLint formatting fixes to JavaScript examples
- Maintain readability of truncated JSON examples for documentation

This ensures the ESLint configuration can run successfully on all
documentation files while preserving the illustrative ellipsis
syntax that helps readers understand example structure without
overwhelming detail.

Original issue: JSON code blocks with "..." syntax were causing
ESLint parsing failures in markdown files
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Sep 18, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
ccusage-guide 55b2217 Sep 18 2025, 05:41 PM

@coderabbitai
Copy link

coderabbitai bot commented Sep 18, 2025

Warning

Rate limit exceeded

@ryoppippi has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 10 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between ef6aa53 and 55b2217.

📒 Files selected for processing (4)
  • docs/guide/codex/daily.md (1 hunks)
  • docs/guide/codex/index.md (1 hunks)
  • docs/guide/codex/monthly.md (1 hunks)
  • docs/guide/codex/session.md (1 hunks)

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Updates docs tooling and content: type-only imports and dynamic API sidebar in VitePress config; adds docs-specific ESLint config and scripts; broad formatting across guides; expands environment variables guide; inserts eslint-skip markers in JSON samples; minor TypeDoc/tsconfig/wrangler/utility formatting edits.

Changes

Cohort / File(s) Summary
VitePress config & sidebar
docs/.vitepress/config.ts
Switches DefaultTheme to type-only import; reads/pars-es typedoc-sidebar.json into a typed DefaultTheme.SidebarItem[] and spreads into API sidebar; reformats Cloudflare redirect plugin to mode: 'generate'; semicolon/formatting tweaks.
Docs linting setup
docs/eslint.config.js, docs/package.json
Adds ESLint config using @ryoppippi/eslint-config with markdown enabled and ignore globs; adds lint and format scripts; adds ESLint-related devDependencies.
TypeDoc/build configs
docs/typedoc.config.ts, docs/update-api-index.ts, docs/tsconfig.json, docs/wrangler.jsonc
Minor formatting/semicolon changes; whitespace/style tweak to import.meta.main condition; reorder/indentation updates; no semantic changes.
Environment variables guide updates
docs/guide/environment-variables.md
Adds new default CLAUDE_CONFIG_DIR path (~/.config/claude/projects/), reformats Log Levels table, fixes list formatting, adds shell examples, and documents precedence order.
JSON lint-skip markers
docs/guide/json-output.md
Inserts <!-- eslint-skip --> before two JSON blocks; minor stylistic JS callback change; whitespace cleanups.
Docs content formatting (guides)
docs/guide/cli-options.md, docs/guide/codex/*, docs/guide/config-files.md, docs/guide/configuration.md, docs/guide/custom-paths.md, docs/guide/daily-reports.md, docs/guide/directory-detection.md, docs/guide/installation.md, docs/guide/mcp-server.md, docs/guide/session-reports.md, docs/guide/statusline.md, docs/guide/weekly-reports.md, docs/index.md
Table realignment, indentation (tabs), added blank lines, trailing newline fixes; one new bullet in directory detection; no behavioral changes.
Project docs overview
docs/CLAUDE.md
Expands development commands, deployment, architecture/structure, key files, guidelines (incl. ESLint-in-Markdown and screenshots), workflow, and build process; formatting improvements.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Dev as Dev
  participant VitePress as VitePress Config
  participant FS as FS
  participant JSON as typedoc-sidebar.json
  participant Site as Docs Site

  Dev->>VitePress: run build
  VitePress->>FS: readFile(typedoc-sidebar.json)
  FS-->>VitePress: JSON string
  VitePress->>VitePress: JSON.parse → typed SidebarItem[]
  VitePress->>Site: generate sidebar (API section includes parsed items)
  Note over VitePress,Site: Cloudflare redirect plugin runs in generate mode
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A nibble of tabs, a hop through the trees,
I linted the leaves with markdown breeze.
The sidebar grew from JSON seed,
Redirects aligned to follow the lead.
Configs now tidy—hippity-hooray!
Docs bloom brighter for readers today. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "feat(docs): add ESLint configuration for documentation linting" succinctly and accurately describes the primary change — adding an ESLint config and related lint/format scripts for the docs package — and aligns with the modified files (docs/eslint.config.js, docs/package.json, and related doc updates), while following conventional commit style.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

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
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @ryoppippi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces robust linting capabilities to the documentation package, addressing previous inconsistencies in code formatting and quality. By integrating ESLint with TypeScript and Markdown support, the documentation now adheres to the same high code quality standards as the rest of the monorepo, ensuring better maintainability and a more standardized content presentation. This change also enables automated quality checks within the CI/CD pipeline.

Highlights

  • ESLint Configuration: A comprehensive ESLint configuration (eslint.config.js) has been added to the docs package, enabling TypeScript and Markdown linting rules to enforce code quality and consistency.
  • New Package Scripts: New lint and format commands have been added to package.json for the docs package, allowing for automated linting validation and auto-fixing of documentation files.
  • Dependency Updates: ESLint and related plugins, including @ryoppippi/eslint-config and eslint-plugin-format, have been added as development dependencies to support the new linting setup.
  • Code Quality Improvements: ESLint auto-fixes were applied across all documentation files, resolving existing formatting inconsistencies and potential quality issues in TypeScript and Markdown content.
  • Documentation Guidelines: The CLAUDE.md file has been updated to include new ESLint usage guidelines, specifically how to skip ESLint parsing for certain Markdown code blocks.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 18, 2025

Open in StackBlitz

npm i https://pkg.pr.new/ryoppippi/ccusage@644
npm i https://pkg.pr.new/ryoppippi/ccusage/@ccusage/codex@644
npm i https://pkg.pr.new/ryoppippi/ccusage/@ccusage/mcp@644

commit: 55b2217

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces ESLint to the docs package, a great step towards improving code quality and consistency. The changes include adding the necessary configuration, scripts, and dependencies, and applying auto-fixes across numerous documentation and TypeScript files. The new setup is clean and the formatting changes improve readability. I have one suggestion regarding the ESLint ignore configuration to ensure more of the codebase benefits from linting in the future.

'.vitepress/cache',
'api/**',
'public/**',
'update-api-index.ts', // Script file with specific patterns
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Ignoring the entire update-api-index.ts file might be too broad, as it prevents any future linting for style or potential bugs. The changes in this pull request actually apply a lint fix to this file (if( -> if ( ... )), which suggests it can be at least partially linted.

If there are specific lines causing issues (e.g., with Bun.$), consider using inline // eslint-disable-next-line <rule-name> comments for those specific lines instead of ignoring the whole file. This would ensure the rest of the file continues to benefit from linting.

Alternatively, if the shared ESLint config supports it, you could configure a separate override for script files like this one.

- Accept new --compact flag from main branch
- Apply ESLint formatting to table structures
- Maintain consistent table column alignment
@ryoppippi ryoppippi merged commit 37aec60 into main Sep 18, 2025
14 of 15 checks passed
@ryoppippi ryoppippi deleted the feat/add-eslint-to-docs branch September 18, 2025 17:41
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: 2

Caution

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

⚠️ Outside diff range comments (6)
docs/update-api-index.ts (1)

39-43: Replace console. with repo logger per docs tooling policy.*

Documentation scripts shouldn’t use console.log/error. Switch to the shared logger and keep explicit .ts extension.

+import { logger } from './logger.ts';
@@
-    await Bun.write(apiIndexPath, content);
-    console.log('✅ Updated API index with module descriptions');
+    await Bun.write(apiIndexPath, content);
+    logger.success('Updated API index with module descriptions');
@@
-    console.error('❌ Failed to update API index:', error);
+    logger.error({ err: error }, 'Failed to update API index');
@@
-    await Bun.write(constsIndexPath, content);
-    console.log('✅ Updated constants page with disclaimer');
+    await Bun.write(constsIndexPath, content);
+    logger.success('Updated constants page with disclaimer');
@@
-    console.error('❌ Failed to update constants page:', error);
+    logger.warn({ err: error }, 'Failed to update constants page');

If a logger isn’t available in docs yet, I can add a minimal wrapper (consola) in docs/logger.ts. Want me to push that?

Also applies to: 66-70

docs/guide/mcp-server.md (1)

1-1: Move Claude Desktop screenshot immediately after H1 (required).

Guideline: screenshot must appear right after the page H1. Relocate it from the “Claude Desktop Integration” section to just below the title.

 # MCP Server
+
+![Claude Desktop MCP Configuration](/mcp-claude-desktop.avif)
@@
-## Claude Desktop Integration
-
-![Claude Desktop MCP Configuration](/mcp-claude-desktop.avif)
+## Claude Desktop Integration

Also applies to: 92-93

docs/guide/json-output.md (1)

345-345: Fix jq path for daily totals (wrong key).

Daily examples use totals.totalCost, not summary.totalCostUSD. Update command.

-ccusage daily --json --since $(date -d '7 days ago' +%Y%m%d) | jq '.summary.totalCostUSD'
+ccusage daily --json --since $(date -d '7 days ago' +%Y%m%d) | jq '.totals.totalCost'
docs/guide/statusline.md (1)

1-4: Add a screenshot immediately after the H1.

Guideline requires a screenshot right after the main heading, with root‑relative path and descriptive alt text.

Apply this minimal addition after Line 1:

 # Statusline Integration (Beta) 🚀
+
+![Statusline integration in Claude Code status bar](/statusline-example.png)
docs/guide/cli-options.md (1)

1-4: Add a screenshot immediately after the H1.

Per guideline, include a root‑relative image with alt text.

Suggested insertion:

 # Command-Line Options
+
+![Overview of ccusage CLI options in terminal](/cli-options-overview.png)
docs/guide/environment-variables.md (1)

1-4: Add a screenshot immediately after the H1.

Guideline requires it; include alt text and root‑relative path.

Example:

 # Environment Variables
+
+![ccusage environment variables usage in terminal](/env-vars-guide.png)
🧹 Nitpick comments (15)
docs/guide/daily-reports.md (4)

21-22: Avoid duplicate screenshot with identical alt text.

This repeats the main image and adds noise for screen readers. Either remove it or change the alt text to clarify purpose.

-![Daily usage report showing token usage and costs by date with model breakdown](/screenshot.png)
+<!-- Example output is already illustrated above; removing duplicate image -->

206-210: "Find Expensive Days" example appears to sort by date, not by cost.

Earlier, --order controls date order. If a cost-based sort flag exists, use it; otherwise, reword the example to reflect date sorting.

-# Sort by cost (highest first)
-ccusage daily --order desc
+# Sort by date (newest first)
+ccusage daily --order desc

228-230: GNU date syntax may not work on macOS.

Consider adding a macOS-friendly variant to reduce friction for users.

 # Last 7 days
-ccusage daily --since $(date -d '7 days ago' +%Y%m%d)
+ccusage daily --since $(date -d '7 days ago' +%Y%m%d)
+# macOS:
+# ccusage daily --since $(date -v -7d +%Y%m%d)

249-258: JSON block contains a comment; use jsonc or remove the comment for valid JSON.

Also ensures linters don’t flag the sample.

-```json
-// .ccusage/ccusage.json - Set custom project names for better reporting
+```jsonc
+// .ccusage/ccusage.json – Set custom project names for better reporting
 {
 	"commands": {
 		"daily": {
 			"projectAliases": "uuid-project=Frontend App,long-name=Backend API"
 		}
 	}
 }

</blockquote></details>
<details>
<summary>docs/index.md (1)</summary><blockquote>

`81-81`: **Improve a11y alt text and prefer root-relative image path.**

Alt "Sponsors" isn’t descriptive. Consider mirroring the SVG under docs/public and using a root‑relative path with a descriptive alt (e.g., “Sponsor logos”).  

```diff
-      <img src="https://cdn.jsdelivr.net/gh/ryoppippi/sponsors@main/sponsors.svg" alt="Sponsors" style="max-width: 100%; height: auto;">
+      <img src="/sponsors.svg" alt="Sponsor logos supporting ccusage" style="max-width: 100%; height: auto;">
docs/update-api-index.ts (1)

23-45: Optional: Prefer Result.try over try/catch for I/O.

To align with codebase conventions, wrap Bun I/O in Result and early‑return on failures.

Would you like me to draft a Result-based refactor here?

Also applies to: 50-71

docs/guide/custom-paths.md (1)

296-310: Fix markdownlint MD010: hard tabs in JSON block.

Replace tabs with spaces to satisfy no-hard-tabs.

-		"ccusage": {
-			"command": "npx",
-			"args": ["@ccusage/mcp@latest"],
-			"env": {
-				"CLAUDE_CONFIG_DIR": "/path/to/your/claude/data"
-			}
-		},
+    "ccusage": {
+      "command": "npx",
+      "args": ["@ccusage/mcp@latest"],
+      "env": {
+        "CLAUDE_CONFIG_DIR": "/path/to/your/claude/data"
+      }
+    },
-		"ccusage-archive": {
-			"command": "npx",
-			"args": ["@ccusage/mcp@latest"],
-			"env": {
-				"CLAUDE_CONFIG_DIR": "/archive/claude-2024,/archive/claude-2025"
-			}
-		}
+    "ccusage-archive": {
+      "command": "npx",
+      "args": ["@ccusage/mcp@latest"],
+      "env": {
+        "CLAUDE_CONFIG_DIR": "/archive/claude-2024,/archive/claude-2025"
+      }
+    }
docs/guide/configuration.md (1)

59-66: Replace hard tabs in JSON blocks (markdownlint MD010).

Tabs will fail MD010; switch to spaces for code-fence content.

Example fix for one block:

-	"$schema": "https://ccusage.com/config-schema.json",
-	"defaults": {
-		"timezone": "America/New_York",
-		"locale": "en-US",
-		"breakdown": true
-	}
+  "$schema": "https://ccusage.com/config-schema.json",
+  "defaults": {
+    "timezone": "America/New_York",
+    "locale": "en-US",
+    "breakdown": true
+  }

Also applies to: 83-92, 103-109, 184-189, 261-261

docs/guide/config-files.md (1)

13-14: Avoid hard tabs in Markdown (MD010).

Several JSON fences use tabs; convert to spaces to satisfy markdownlint.

Sample fix:

-	"breakdown": true
+  "breakdown": true

Also applies to: 23-29, 36-45, 63-74, 101-110, 121-131, 139-154, 163-179, 187-196, 203-211, 245-255, 262-269, 314-317, 420-424

docs/guide/weekly-reports.md (1)

111-143: Replace tabs with spaces in JSON block (MD010).

Use spaces in code fences to avoid markdownlint violations.

-	"weekly": [
+  "weekly": [
docs/guide/json-output.md (1)

433-434: Replace tabs with spaces (MD010) in Node snippet.

Avoid tabs to satisfy markdownlint.

-	console.log('Project Usage Summary:');
-	projectCosts.forEach((project) => {
+  console.log('Project Usage Summary:');
+  projectCosts.forEach((project) => {
docs/guide/statusline.md (2)

23-27: Replace hard tabs with spaces to satisfy markdownlint (MD010).

Tabs in JSON blocks trigger MD010. Convert to 2 spaces.

Apply this pattern (example for Lines 23–27; repeat for other blocks):

-	"statusLine": {
-		"type": "command",
-		"command": "bun x ccusage statusline", // Use "npx -y ccusage statusline" if you prefer npm
-		"padding": 0 // Optional: set to 0 to let status line go to edge
-	}
+  "statusLine": {
+    "type": "command",
+    "command": "bun x ccusage statusline", // Use "npx -y ccusage statusline" if you prefer npm
+    "padding": 0 // Optional: set to 0 to let status line go to edge
+  }

Also applies to: 39-43, 53-57, 69-73, 166-170, 220-221


111-113: Add a language to the fenced code block (MD040).

Use text/plain since this is output, not code.

-```
+```text
 🤖 Opus | 💰 $0.00 session / $0.00 today / No active block
docs/.vitepress/config.ts (2)

9-11: Make typedoc sidebar loading resilient (fallback when file is missing).

Avoid runtime crash if typedoc-sidebar.json isn’t generated yet (e.g., running vitepress directly).

-const typedocSidebarJson = fs.readFileSync(path.join(import.meta.dirname, '../api/typedoc-sidebar.json'));
-const typedocSidebar = JSON.parse(typedocSidebarJson.toString()) as DefaultTheme.SidebarItem[];
+let typedocSidebar: DefaultTheme.SidebarItem[] = [];
+try {
+  const typedocSidebarJson = fs.readFileSync(
+    path.join(import.meta.dirname, '../api/typedoc-sidebar.json')
+  );
+  typedocSidebar = JSON.parse(typedocSidebarJson.toString()) as DefaultTheme.SidebarItem[];
+} catch {
+  // Fallback for dev when API docs have not been generated yet
+  typedocSidebar = [];
+}

151-160: Minor typing nit: avoid as any if possible.

If the plugin exposes proper types, import them to drop as any. Otherwise, ok as-is.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fdab700 and ef6aa53.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (25)
  • docs/.vitepress/config.ts (2 hunks)
  • docs/CLAUDE.md (6 hunks)
  • docs/eslint.config.js (1 hunks)
  • docs/guide/cli-options.md (3 hunks)
  • docs/guide/codex/daily.md (1 hunks)
  • docs/guide/codex/index.md (1 hunks)
  • docs/guide/codex/monthly.md (1 hunks)
  • docs/guide/config-files.md (12 hunks)
  • docs/guide/configuration.md (8 hunks)
  • docs/guide/custom-paths.md (1 hunks)
  • docs/guide/daily-reports.md (1 hunks)
  • docs/guide/directory-detection.md (2 hunks)
  • docs/guide/environment-variables.md (4 hunks)
  • docs/guide/installation.md (1 hunks)
  • docs/guide/json-output.md (5 hunks)
  • docs/guide/mcp-server.md (1 hunks)
  • docs/guide/session-reports.md (3 hunks)
  • docs/guide/statusline.md (12 hunks)
  • docs/guide/weekly-reports.md (2 hunks)
  • docs/index.md (1 hunks)
  • docs/package.json (1 hunks)
  • docs/tsconfig.json (1 hunks)
  • docs/typedoc.config.ts (1 hunks)
  • docs/update-api-index.ts (1 hunks)
  • docs/wrangler.jsonc (1 hunks)
🧰 Additional context used
📓 Path-based instructions (10)
docs/**/*.{ts,js,mjs,cjs}

📄 CodeRabbit inference engine (docs/CLAUDE.md)

Do not use console.log in documentation scripts; use appropriate logging instead

Files:

  • docs/update-api-index.ts
  • docs/eslint.config.js
  • docs/typedoc.config.ts
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.ts: Do not use console.log; use the logger (logger.ts) instead, unless explicitly eslint-disabled.
Use Node.js path utilities for file path manipulation for cross-platform compatibility.
Use explicit .ts extensions for local file imports (e.g., import { foo } from './utils.ts').
Prefer @praha/byethrow Result over try/catch; use Result.try(), Result.isFailure()/Result.isSuccess() type guards, and early returns; keep try/catch only for complex I/O or hard-to-refactor legacy code.
Variables use camelCase; types use PascalCase; constants may use UPPER_SNAKE_CASE.
Only export constants/functions/types that are actually used by other modules; keep internal/private items non-exported.
Use in-source testing with if (import.meta.vitest != null) blocks; avoid separate test files.
Never use dynamic imports (await import()) anywhere in the codebase.
Never use dynamic imports in Vitest test blocks in particular.
Vitest globals are enabled—use describe, it, expect without importing them.
Tests must use current Claude 4 models (Sonnet and Opus) with names that exactly match LiteLLM’s pricing database; verify model existence before adding tests and include coverage for both models.

Files:

  • docs/update-api-index.ts
  • docs/typedoc.config.ts
docs/guide/**/*.md

📄 CodeRabbit inference engine (docs/CLAUDE.md)

docs/guide/**/*.md: Place screenshots immediately after the main H1 heading in guide markdown pages
When referencing images stored in docs/public, use root-relative paths like /filename.png

Files:

  • docs/guide/codex/daily.md
  • docs/guide/daily-reports.md
  • docs/guide/mcp-server.md
  • docs/guide/codex/index.md
  • docs/guide/session-reports.md
  • docs/guide/installation.md
  • docs/guide/custom-paths.md
  • docs/guide/codex/monthly.md
  • docs/guide/configuration.md
  • docs/guide/json-output.md
  • docs/guide/cli-options.md
  • docs/guide/weekly-reports.md
  • docs/guide/config-files.md
  • docs/guide/statusline.md
  • docs/guide/directory-detection.md
  • docs/guide/environment-variables.md
docs/**/*.md

📄 CodeRabbit inference engine (docs/CLAUDE.md)

Always include descriptive alt text for images and screenshots in Markdown

docs/**/*.md: Use images with site-root-relative paths like /screenshot.png (stored under /docs/public/).
All images must include descriptive alt text for accessibility.

Files:

  • docs/guide/codex/daily.md
  • docs/guide/daily-reports.md
  • docs/guide/mcp-server.md
  • docs/guide/codex/index.md
  • docs/guide/session-reports.md
  • docs/guide/installation.md
  • docs/guide/custom-paths.md
  • docs/guide/codex/monthly.md
  • docs/guide/configuration.md
  • docs/guide/json-output.md
  • docs/guide/cli-options.md
  • docs/guide/weekly-reports.md
  • docs/guide/config-files.md
  • docs/CLAUDE.md
  • docs/guide/statusline.md
  • docs/index.md
  • docs/guide/directory-detection.md
  • docs/guide/environment-variables.md
docs/guide/**

📄 CodeRabbit inference engine (docs/CLAUDE.md)

Place all user-facing guides and tutorials under docs/guide/

Files:

  • docs/guide/codex/daily.md
  • docs/guide/daily-reports.md
  • docs/guide/mcp-server.md
  • docs/guide/codex/index.md
  • docs/guide/session-reports.md
  • docs/guide/installation.md
  • docs/guide/custom-paths.md
  • docs/guide/codex/monthly.md
  • docs/guide/configuration.md
  • docs/guide/json-output.md
  • docs/guide/cli-options.md
  • docs/guide/weekly-reports.md
  • docs/guide/config-files.md
  • docs/guide/statusline.md
  • docs/guide/directory-detection.md
  • docs/guide/environment-variables.md
docs/guide/daily-reports.md

📄 CodeRabbit inference engine (docs/CLAUDE.md)

Ensure the daily report output screenshot appears immediately after the H1 in /docs/guide/daily-reports.md

Files:

  • docs/guide/daily-reports.md
{docs/guide/index.md,docs/guide/daily-reports.md,docs/guide/live-monitoring.md,docs/guide/mcp-server.md}

📄 CodeRabbit inference engine (CLAUDE.md)

In documentation guides, place the main screenshot immediately after the H1 heading for the listed pages.

Files:

  • docs/guide/daily-reports.md
  • docs/guide/mcp-server.md
docs/guide/mcp-server.md

📄 CodeRabbit inference engine (docs/CLAUDE.md)

Ensure the Claude Desktop integration screenshot appears immediately after the H1 in /docs/guide/mcp-server.md

Files:

  • docs/guide/mcp-server.md
**/tsconfig*.json

📄 CodeRabbit inference engine (CLAUDE.md)

Use TypeScript strict mode with bundler moduleResolution.

Files:

  • docs/tsconfig.json
**/package.json

📄 CodeRabbit inference engine (CLAUDE.md)

Dependencies should be added as devDependencies unless explicitly requested otherwise.

Files:

  • docs/package.json
🧠 Learnings (21)
📚 Learning: 2025-09-18T16:07:16.277Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: apps/codex/CLAUDE.md:0-0
Timestamp: 2025-09-18T16:07:16.277Z
Learning: --json outputs structured results with aggregated tokens and USD cost included in totals

Applied to files:

  • docs/guide/codex/daily.md
  • docs/guide/codex/monthly.md
  • docs/guide/weekly-reports.md
📚 Learning: 2025-09-17T11:09:36.549Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: docs/CLAUDE.md:0-0
Timestamp: 2025-09-17T11:09:36.549Z
Learning: Applies to docs/guide/mcp-server.md : Ensure the Claude Desktop integration screenshot appears immediately after the H1 in /docs/guide/mcp-server.md

Applied to files:

  • docs/guide/mcp-server.md
📚 Learning: 2025-09-18T16:06:37.443Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: apps/ccusage/CLAUDE.md:0-0
Timestamp: 2025-09-18T16:06:37.443Z
Learning: Applies to apps/ccusage/**/*.ts : Use `.ts` extensions for local imports (e.g., `import { foo } from './utils.ts'`)

Applied to files:

  • docs/tsconfig.json
📚 Learning: 2025-09-18T16:05:56.919Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:05:56.919Z
Learning: Applies to **/*.ts : Vitest globals are enabled—use describe, it, expect without importing them.

Applied to files:

  • docs/tsconfig.json
📚 Learning: 2025-09-18T16:05:56.919Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:05:56.919Z
Learning: Applies to **/tsconfig*.json : Use TypeScript strict mode with bundler moduleResolution.

Applied to files:

  • docs/tsconfig.json
📚 Learning: 2025-09-18T16:06:37.443Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: apps/ccusage/CLAUDE.md:0-0
Timestamp: 2025-09-18T16:06:37.443Z
Learning: Applies to apps/ccusage/src/**/*.ts : Write tests in-source using `if (import.meta.vitest != null)` blocks instead of separate test files

Applied to files:

  • docs/tsconfig.json
📚 Learning: 2025-09-18T16:06:37.443Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: apps/ccusage/CLAUDE.md:0-0
Timestamp: 2025-09-18T16:06:37.443Z
Learning: Applies to apps/ccusage/src/**/*.ts : Use Vitest globals (`describe`, `it`, `expect`) without imports in test blocks

Applied to files:

  • docs/tsconfig.json
📚 Learning: 2025-09-18T16:05:56.919Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:05:56.919Z
Learning: Applies to **/*.ts : Use explicit .ts extensions for local file imports (e.g., import { foo } from './utils.ts').

Applied to files:

  • docs/tsconfig.json
📚 Learning: 2025-09-18T16:07:16.277Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: apps/codex/CLAUDE.md:0-0
Timestamp: 2025-09-18T16:07:16.277Z
Learning: Codex session usage must be read from ${CODEX_HOME:-~/.codex}/sessions/, with CODEX_HOME resolved and defaulting to ~/.codex

Applied to files:

  • docs/guide/codex/index.md
📚 Learning: 2025-09-18T16:07:16.277Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: apps/codex/CLAUDE.md:0-0
Timestamp: 2025-09-18T16:07:16.277Z
Learning: Treat Codex as a sibling to apps/ccusage; reuse shared packages, command names, and flag semantics; diverge only when Codex-specific data requires it and document inline

Applied to files:

  • docs/guide/codex/index.md
📚 Learning: 2025-09-18T16:05:56.919Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:05:56.919Z
Learning: When working in a package, consult that package’s CLAUDE.md for package-specific guidance.

Applied to files:

  • docs/guide/configuration.md
  • docs/CLAUDE.md
  • docs/guide/directory-detection.md
📚 Learning: 2025-09-18T16:07:16.277Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: apps/codex/CLAUDE.md:0-0
Timestamp: 2025-09-18T16:07:16.277Z
Learning: Cost calculation per model/date: charge non-cached input, cached input (fallback to input rate if missing), and output using the specified per-million token rates

Applied to files:

  • docs/guide/weekly-reports.md
📚 Learning: 2025-09-18T16:06:37.443Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: apps/ccusage/CLAUDE.md:0-0
Timestamp: 2025-09-18T16:06:37.443Z
Learning: After any code change, run format, typecheck, and tests in parallel (`pnpm run format`, `pnpm typecheck`, `pnpm run test`)

Applied to files:

  • docs/package.json
  • docs/CLAUDE.md
📚 Learning: 2025-09-18T16:05:56.919Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:05:56.919Z
Learning: After making code changes, always run format, typecheck, and test in parallel (pnpm run format, pnpm typecheck, pnpm run test).

Applied to files:

  • docs/CLAUDE.md
📚 Learning: 2025-09-17T18:29:15.764Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: apps/mcp/CLAUDE.md:0-0
Timestamp: 2025-09-17T18:29:15.764Z
Learning: After code changes, always run `pnpm run format`, `pnpm typecheck`, and `pnpm run test` in parallel

Applied to files:

  • docs/CLAUDE.md
📚 Learning: 2025-09-17T11:09:36.549Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: docs/CLAUDE.md:0-0
Timestamp: 2025-09-17T11:09:36.549Z
Learning: Applies to docs/guide/** : Place all user-facing guides and tutorials under docs/guide/

Applied to files:

  • docs/CLAUDE.md
📚 Learning: 2025-09-17T11:09:36.549Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: docs/CLAUDE.md:0-0
Timestamp: 2025-09-17T11:09:36.549Z
Learning: Applies to docs/public/** : Store static assets (screenshots, schemas) under docs/public/

Applied to files:

  • docs/CLAUDE.md
📚 Learning: 2025-09-17T11:09:36.549Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: docs/CLAUDE.md:0-0
Timestamp: 2025-09-17T11:09:36.549Z
Learning: Maintain consistency with established patterns for new documentation pages

Applied to files:

  • docs/CLAUDE.md
📚 Learning: 2025-09-17T11:09:36.549Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: docs/CLAUDE.md:0-0
Timestamp: 2025-09-17T11:09:36.549Z
Learning: Applies to docs/guide/**/*.md : Place screenshots immediately after the main H1 heading in guide markdown pages

Applied to files:

  • docs/CLAUDE.md
📚 Learning: 2025-09-18T16:05:56.919Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-18T16:05:56.919Z
Learning: Applies to {docs/guide/index.md,docs/guide/daily-reports.md,docs/guide/live-monitoring.md,docs/guide/mcp-server.md} : In documentation guides, place the main screenshot immediately after the H1 heading for the listed pages.

Applied to files:

  • docs/CLAUDE.md
📚 Learning: 2025-09-17T11:09:36.549Z
Learnt from: CR
PR: ryoppippi/ccusage#0
File: docs/CLAUDE.md:0-0
Timestamp: 2025-09-17T11:09:36.549Z
Learning: Applies to docs/guide/index.md : Ensure the main usage screenshot appears immediately after the H1 in /docs/guide/index.md

Applied to files:

  • docs/CLAUDE.md
🪛 markdownlint-cli2 (0.17.2)
docs/guide/mcp-server.md

103-103: Hard tabs
Column: 1

(MD010, no-hard-tabs)


104-104: Hard tabs
Column: 1

(MD010, no-hard-tabs)


105-105: Hard tabs
Column: 1

(MD010, no-hard-tabs)


106-106: Hard tabs
Column: 1

(MD010, no-hard-tabs)


107-107: Hard tabs
Column: 1

(MD010, no-hard-tabs)


108-108: Hard tabs
Column: 1

(MD010, no-hard-tabs)

docs/guide/custom-paths.md

296-296: Hard tabs
Column: 1

(MD010, no-hard-tabs)


297-297: Hard tabs
Column: 1

(MD010, no-hard-tabs)


298-298: Hard tabs
Column: 1

(MD010, no-hard-tabs)


299-299: Hard tabs
Column: 1

(MD010, no-hard-tabs)


300-300: Hard tabs
Column: 1

(MD010, no-hard-tabs)


301-301: Hard tabs
Column: 1

(MD010, no-hard-tabs)


302-302: Hard tabs
Column: 1

(MD010, no-hard-tabs)


303-303: Hard tabs
Column: 1

(MD010, no-hard-tabs)


304-304: Hard tabs
Column: 1

(MD010, no-hard-tabs)


305-305: Hard tabs
Column: 1

(MD010, no-hard-tabs)


306-306: Hard tabs
Column: 1

(MD010, no-hard-tabs)


307-307: Hard tabs
Column: 1

(MD010, no-hard-tabs)


308-308: Hard tabs
Column: 1

(MD010, no-hard-tabs)


309-309: Hard tabs
Column: 1

(MD010, no-hard-tabs)


310-310: Hard tabs
Column: 1

(MD010, no-hard-tabs)

docs/guide/configuration.md

59-59: Hard tabs
Column: 1

(MD010, no-hard-tabs)


60-60: Hard tabs
Column: 1

(MD010, no-hard-tabs)


61-61: Hard tabs
Column: 1

(MD010, no-hard-tabs)


62-62: Hard tabs
Column: 1

(MD010, no-hard-tabs)


63-63: Hard tabs
Column: 1

(MD010, no-hard-tabs)


64-64: Hard tabs
Column: 1

(MD010, no-hard-tabs)


83-83: Hard tabs
Column: 1

(MD010, no-hard-tabs)


84-84: Hard tabs
Column: 1

(MD010, no-hard-tabs)


85-85: Hard tabs
Column: 1

(MD010, no-hard-tabs)


86-86: Hard tabs
Column: 1

(MD010, no-hard-tabs)


87-87: Hard tabs
Column: 1

(MD010, no-hard-tabs)


88-88: Hard tabs
Column: 1

(MD010, no-hard-tabs)


89-89: Hard tabs
Column: 1

(MD010, no-hard-tabs)


90-90: Hard tabs
Column: 1

(MD010, no-hard-tabs)


91-91: Hard tabs
Column: 1

(MD010, no-hard-tabs)


92-92: Hard tabs
Column: 1

(MD010, no-hard-tabs)


103-103: Hard tabs
Column: 1

(MD010, no-hard-tabs)


104-104: Hard tabs
Column: 1

(MD010, no-hard-tabs)


105-105: Hard tabs
Column: 1

(MD010, no-hard-tabs)


106-106: Hard tabs
Column: 1

(MD010, no-hard-tabs)


107-107: Hard tabs
Column: 1

(MD010, no-hard-tabs)


108-108: Hard tabs
Column: 1

(MD010, no-hard-tabs)


184-184: Hard tabs
Column: 1

(MD010, no-hard-tabs)


185-185: Hard tabs
Column: 1

(MD010, no-hard-tabs)


186-186: Hard tabs
Column: 1

(MD010, no-hard-tabs)


187-187: Hard tabs
Column: 1

(MD010, no-hard-tabs)


188-188: Hard tabs
Column: 1

(MD010, no-hard-tabs)


261-261: Hard tabs
Column: 1

(MD010, no-hard-tabs)

docs/guide/json-output.md

433-433: Hard tabs
Column: 1

(MD010, no-hard-tabs)


434-434: Hard tabs
Column: 1

(MD010, no-hard-tabs)

docs/guide/weekly-reports.md

111-111: Hard tabs
Column: 1

(MD010, no-hard-tabs)


112-112: Hard tabs
Column: 1

(MD010, no-hard-tabs)


113-113: Hard tabs
Column: 1

(MD010, no-hard-tabs)


114-114: Hard tabs
Column: 1

(MD010, no-hard-tabs)


115-115: Hard tabs
Column: 1

(MD010, no-hard-tabs)


116-116: Hard tabs
Column: 1

(MD010, no-hard-tabs)


117-117: Hard tabs
Column: 1

(MD010, no-hard-tabs)


118-118: Hard tabs
Column: 1

(MD010, no-hard-tabs)


119-119: Hard tabs
Column: 1

(MD010, no-hard-tabs)


120-120: Hard tabs
Column: 1

(MD010, no-hard-tabs)


121-121: Hard tabs
Column: 1

(MD010, no-hard-tabs)


122-122: Hard tabs
Column: 1

(MD010, no-hard-tabs)


123-123: Hard tabs
Column: 1

(MD010, no-hard-tabs)


124-124: Hard tabs
Column: 1

(MD010, no-hard-tabs)


125-125: Hard tabs
Column: 1

(MD010, no-hard-tabs)


126-126: Hard tabs
Column: 1

(MD010, no-hard-tabs)


127-127: Hard tabs
Column: 1

(MD010, no-hard-tabs)


128-128: Hard tabs
Column: 1

(MD010, no-hard-tabs)


129-129: Hard tabs
Column: 1

(MD010, no-hard-tabs)


130-130: Hard tabs
Column: 1

(MD010, no-hard-tabs)


131-131: Hard tabs
Column: 1

(MD010, no-hard-tabs)


132-132: Hard tabs
Column: 1

(MD010, no-hard-tabs)


133-133: Hard tabs
Column: 1

(MD010, no-hard-tabs)


134-134: Hard tabs
Column: 1

(MD010, no-hard-tabs)


135-135: Hard tabs
Column: 1

(MD010, no-hard-tabs)


136-136: Hard tabs
Column: 1

(MD010, no-hard-tabs)


137-137: Hard tabs
Column: 1

(MD010, no-hard-tabs)


138-138: Hard tabs
Column: 1

(MD010, no-hard-tabs)


139-139: Hard tabs
Column: 1

(MD010, no-hard-tabs)


140-140: Hard tabs
Column: 1

(MD010, no-hard-tabs)


141-141: Hard tabs
Column: 1

(MD010, no-hard-tabs)


142-142: Hard tabs
Column: 1

(MD010, no-hard-tabs)

docs/guide/config-files.md

13-13: Hard tabs
Column: 1

(MD010, no-hard-tabs)


23-23: Hard tabs
Column: 1

(MD010, no-hard-tabs)


24-24: Hard tabs
Column: 1

(MD010, no-hard-tabs)


25-25: Hard tabs
Column: 1

(MD010, no-hard-tabs)


26-26: Hard tabs
Column: 1

(MD010, no-hard-tabs)


27-27: Hard tabs
Column: 1

(MD010, no-hard-tabs)


28-28: Hard tabs
Column: 1

(MD010, no-hard-tabs)


36-36: Hard tabs
Column: 1

(MD010, no-hard-tabs)


37-37: Hard tabs
Column: 1

(MD010, no-hard-tabs)


38-38: Hard tabs
Column: 1

(MD010, no-hard-tabs)


39-39: Hard tabs
Column: 1

(MD010, no-hard-tabs)


40-40: Hard tabs
Column: 1

(MD010, no-hard-tabs)


41-41: Hard tabs
Column: 1

(MD010, no-hard-tabs)


42-42: Hard tabs
Column: 1

(MD010, no-hard-tabs)


43-43: Hard tabs
Column: 1

(MD010, no-hard-tabs)


44-44: Hard tabs
Column: 1

(MD010, no-hard-tabs)


63-63: Hard tabs
Column: 1

(MD010, no-hard-tabs)


64-64: Hard tabs
Column: 1

(MD010, no-hard-tabs)


65-65: Hard tabs
Column: 1

(MD010, no-hard-tabs)


66-66: Hard tabs
Column: 1

(MD010, no-hard-tabs)


67-67: Hard tabs
Column: 1

(MD010, no-hard-tabs)


68-68: Hard tabs
Column: 1

(MD010, no-hard-tabs)


69-69: Hard tabs
Column: 1

(MD010, no-hard-tabs)


70-70: Hard tabs
Column: 1

(MD010, no-hard-tabs)


71-71: Hard tabs
Column: 1

(MD010, no-hard-tabs)


72-72: Hard tabs
Column: 1

(MD010, no-hard-tabs)


101-101: Hard tabs
Column: 1

(MD010, no-hard-tabs)


102-102: Hard tabs
Column: 1

(MD010, no-hard-tabs)


103-103: Hard tabs
Column: 1

(MD010, no-hard-tabs)


104-104: Hard tabs
Column: 1

(MD010, no-hard-tabs)


105-105: Hard tabs
Column: 1

(MD010, no-hard-tabs)


106-106: Hard tabs
Column: 1

(MD010, no-hard-tabs)


107-107: Hard tabs
Column: 1

(MD010, no-hard-tabs)


108-108: Hard tabs
Column: 1

(MD010, no-hard-tabs)


109-109: Hard tabs
Column: 1

(MD010, no-hard-tabs)


121-121: Hard tabs
Column: 1

(MD010, no-hard-tabs)


129-129: Hard tabs
Column: 1

(MD010, no-hard-tabs)


139-139: Hard tabs
Column: 1

(MD010, no-hard-tabs)


140-140: Hard tabs
Column: 1

(MD010, no-hard-tabs)


141-141: Hard tabs
Column: 1

(MD010, no-hard-tabs)


142-142: Hard tabs
Column: 1

(MD010, no-hard-tabs)


143-143: Hard tabs
Column: 1

(MD010, no-hard-tabs)


144-144: Hard tabs
Column: 1

(MD010, no-hard-tabs)


145-145: Hard tabs
Column: 1

(MD010, no-hard-tabs)


146-146: Hard tabs
Column: 1

(MD010, no-hard-tabs)


147-147: Hard tabs
Column: 1

(MD010, no-hard-tabs)


148-148: Hard tabs
Column: 1

(MD010, no-hard-tabs)


149-149: Hard tabs
Column: 1

(MD010, no-hard-tabs)


150-150: Hard tabs
Column: 1

(MD010, no-hard-tabs)


151-151: Hard tabs
Column: 1

(MD010, no-hard-tabs)


152-152: Hard tabs
Column: 1

(MD010, no-hard-tabs)


153-153: Hard tabs
Column: 1

(MD010, no-hard-tabs)


163-163: Hard tabs
Column: 1

(MD010, no-hard-tabs)


164-164: Hard tabs
Column: 1

(MD010, no-hard-tabs)


165-165: Hard tabs
Column: 1

(MD010, no-hard-tabs)


166-166: Hard tabs
Column: 1

(MD010, no-hard-tabs)


167-167: Hard tabs
Column: 1

(MD010, no-hard-tabs)


168-168: Hard tabs
Column: 1

(MD010, no-hard-tabs)


169-169: Hard tabs
Column: 1

(MD010, no-hard-tabs)


170-170: Hard tabs
Column: 1

(MD010, no-hard-tabs)


171-171: Hard tabs
Column: 1

(MD010, no-hard-tabs)


172-172: Hard tabs
Column: 1

(MD010, no-hard-tabs)


173-173: Hard tabs
Column: 1

(MD010, no-hard-tabs)


174-174: Hard tabs
Column: 1

(MD010, no-hard-tabs)


175-175: Hard tabs
Column: 1

(MD010, no-hard-tabs)


176-176: Hard tabs
Column: 1

(MD010, no-hard-tabs)


177-177: Hard tabs
Column: 1

(MD010, no-hard-tabs)


187-187: Hard tabs
Column: 1

(MD010, no-hard-tabs)


188-188: Hard tabs
Column: 1

(MD010, no-hard-tabs)


189-189: Hard tabs
Column: 1

(MD010, no-hard-tabs)


190-190: Hard tabs
Column: 1

(MD010, no-hard-tabs)


191-191: Hard tabs
Column: 1

(MD010, no-hard-tabs)


192-192: Hard tabs
Column: 1

(MD010, no-hard-tabs)


193-193: Hard tabs
Column: 1

(MD010, no-hard-tabs)


194-194: Hard tabs
Column: 1

(MD010, no-hard-tabs)


195-195: Hard tabs
Column: 1

(MD010, no-hard-tabs)


203-203: Hard tabs
Column: 1

(MD010, no-hard-tabs)


204-204: Hard tabs
Column: 1

(MD010, no-hard-tabs)


205-205: Hard tabs
Column: 1

(MD010, no-hard-tabs)


206-206: Hard tabs
Column: 1

(MD010, no-hard-tabs)


207-207: Hard tabs
Column: 1

(MD010, no-hard-tabs)


208-208: Hard tabs
Column: 1

(MD010, no-hard-tabs)


209-209: Hard tabs
Column: 1

(MD010, no-hard-tabs)


217-217: Hard tabs
Column: 1

(MD010, no-hard-tabs)


218-218: Hard tabs
Column: 1

(MD010, no-hard-tabs)


219-219: Hard tabs
Column: 1

(MD010, no-hard-tabs)


220-220: Hard tabs
Column: 1

(MD010, no-hard-tabs)


221-221: Hard tabs
Column: 1

(MD010, no-hard-tabs)


222-222: Hard tabs
Column: 1

(MD010, no-hard-tabs)


223-223: Hard tabs
Column: 1

(MD010, no-hard-tabs)


231-231: Hard tabs
Column: 1

(MD010, no-hard-tabs)


232-232: Hard tabs
Column: 1

(MD010, no-hard-tabs)


233-233: Hard tabs
Column: 1

(MD010, no-hard-tabs)


234-234: Hard tabs
Column: 1

(MD010, no-hard-tabs)


235-235: Hard tabs
Column: 1

(MD010, no-hard-tabs)


236-236: Hard tabs
Column: 1

(MD010, no-hard-tabs)


237-237: Hard tabs
Column: 1

(MD010, no-hard-tabs)


245-245: Hard tabs
Column: 1

(MD010, no-hard-tabs)


246-246: Hard tabs
Column: 1

(MD010, no-hard-tabs)


247-247: Hard tabs
Column: 1

(MD010, no-hard-tabs)


248-248: Hard tabs
Column: 1

(MD010, no-hard-tabs)


249-249: Hard tabs
Column: 1

(MD010, no-hard-tabs)


250-250: Hard tabs
Column: 1

(MD010, no-hard-tabs)


251-251: Hard tabs
Column: 1

(MD010, no-hard-tabs)


252-252: Hard tabs
Column: 1

(MD010, no-hard-tabs)


253-253: Hard tabs
Column: 1

(MD010, no-hard-tabs)


254-254: Hard tabs
Column: 1

(MD010, no-hard-tabs)


262-262: Hard tabs
Column: 1

(MD010, no-hard-tabs)


263-263: Hard tabs
Column: 1

(MD010, no-hard-tabs)


264-264: Hard tabs
Column: 1

(MD010, no-hard-tabs)


265-265: Hard tabs
Column: 1

(MD010, no-hard-tabs)


266-266: Hard tabs
Column: 1

(MD010, no-hard-tabs)


267-267: Hard tabs
Column: 1

(MD010, no-hard-tabs)


268-268: Hard tabs
Column: 1

(MD010, no-hard-tabs)


314-314: Hard tabs
Column: 1

(MD010, no-hard-tabs)


315-315: Hard tabs
Column: 1

(MD010, no-hard-tabs)


316-316: Hard tabs
Column: 1

(MD010, no-hard-tabs)


420-420: Hard tabs
Column: 1

(MD010, no-hard-tabs)


421-421: Hard tabs
Column: 1

(MD010, no-hard-tabs)


422-422: Hard tabs
Column: 1

(MD010, no-hard-tabs)


423-423: Hard tabs
Column: 1

(MD010, no-hard-tabs)


424-424: Hard tabs
Column: 1

(MD010, no-hard-tabs)

docs/guide/statusline.md

23-23: Hard tabs
Column: 1

(MD010, no-hard-tabs)


24-24: Hard tabs
Column: 1

(MD010, no-hard-tabs)


25-25: Hard tabs
Column: 1

(MD010, no-hard-tabs)


26-26: Hard tabs
Column: 1

(MD010, no-hard-tabs)


27-27: Hard tabs
Column: 1

(MD010, no-hard-tabs)


39-39: Hard tabs
Column: 1

(MD010, no-hard-tabs)


40-40: Hard tabs
Column: 1

(MD010, no-hard-tabs)


41-41: Hard tabs
Column: 1

(MD010, no-hard-tabs)


42-42: Hard tabs
Column: 1

(MD010, no-hard-tabs)


43-43: Hard tabs
Column: 1

(MD010, no-hard-tabs)


53-53: Hard tabs
Column: 1

(MD010, no-hard-tabs)


54-54: Hard tabs
Column: 1

(MD010, no-hard-tabs)


55-55: Hard tabs
Column: 1

(MD010, no-hard-tabs)


56-56: Hard tabs
Column: 1

(MD010, no-hard-tabs)


57-57: Hard tabs
Column: 1

(MD010, no-hard-tabs)


69-69: Hard tabs
Column: 1

(MD010, no-hard-tabs)


70-70: Hard tabs
Column: 1

(MD010, no-hard-tabs)


71-71: Hard tabs
Column: 1

(MD010, no-hard-tabs)


72-72: Hard tabs
Column: 1

(MD010, no-hard-tabs)


73-73: Hard tabs
Column: 1

(MD010, no-hard-tabs)


111-111: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


166-166: Hard tabs
Column: 1

(MD010, no-hard-tabs)


167-167: Hard tabs
Column: 1

(MD010, no-hard-tabs)


168-168: Hard tabs
Column: 1

(MD010, no-hard-tabs)


169-169: Hard tabs
Column: 1

(MD010, no-hard-tabs)


170-170: Hard tabs
Column: 1

(MD010, no-hard-tabs)


220-220: Hard tabs
Column: 1

(MD010, no-hard-tabs)


221-221: Hard tabs
Column: 1

(MD010, no-hard-tabs)

⏰ 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: Workers Builds: ccusage-guide
🔇 Additional comments (24)
docs/guide/daily-reports.md (2)

252-256: Content OK; indentation-only change.

No semantic change; sample remains consistent with the explanation below.


1-4: Approve — screenshot present and correctly referenced.
docs/public/screenshot.png exists; markdown references in docs/guide/daily-reports.md at lines 3 and 21.

docs/wrangler.jsonc (1)

2-11: LGTM on wrangler config formatting.

Tabs-only reindent; schema path, build command, and assets settings remain correct.

docs/index.md (1)

72-78: Whitespace cleanup is fine.

No content changes; render unaffected.

docs/update-api-index.ts (1)

74-78: Style nit: spacing change is fine.

if (import.meta.main) spacing reads cleaner.

docs/guide/codex/index.md (1)

34-38: Table alignment changes are fine.

Content unchanged; formatting improved.

docs/guide/codex/daily.md (1)

15-21: LGTM on options table reformat.

Readable, no semantic change.

docs/guide/directory-detection.md (2)

64-66: Good clarification on directory structure.

The added bullet helps readers map projects to workspaces.


115-115: Link addition looks good.

Navigation to the configuration overview is helpful.

docs/tsconfig.json (1)

3-12: Ensure strict mode and moduleResolution="bundler" for docs/tsconfig.json (or confirm inheritance)

docs/tsconfig.json extends ./node_modules/ccusage/tsconfig.json but that file was not found in this checkout; docs/tsconfig.json does not set "strict" or "moduleResolution".

  "compilerOptions": {
+   "strict": true,
+   "moduleResolution": "bundler",

Either add the two lines to docs/tsconfig.json or confirm that node_modules/ccusage/tsconfig.json (or the upstream package) supplies them.

docs/typedoc.config.ts (1)

1-6: Semicolon/style touch-ups look good.

No functional changes; config types remain correct.

docs/guide/installation.md (1)

50-55: Table reformatting LGTM.

Content preserved; readability improved.

docs/guide/session-reports.md (1)

19-21: Whitespace tweaks are fine.

Blank lines improve list readability without changing content.

Also applies to: 44-46, 109-111

docs/guide/json-output.md (2)

29-31: Good: ESLint skip markers before JSON fences.

Prevents ESLint noise on JSON samples.

Also applies to: 61-63


31-55: Unify cost field names across examples.

“Common Fields” lists costUSD, but Daily examples use totalCost. Align naming (either change Daily to costUSD or adjust the field list and jq examples). Please verify actual CLI output and update consistently.

Would you like me to sweep the docs for costUSD/totalCost and produce a unified patch?

Also applies to: 118-143, 270-305

docs/guide/codex/monthly.md (1)

17-23: Table reformat LGTM.

Alignment/padding is fine and keeps content unchanged.

docs/guide/cli-options.md (1)

328-339: Alias table reformat LGTM.

Clearer alignment; content unchanged.

docs/eslint.config.js (1)

1-14: ESLint config looks good; confirm intended ignores.

Ignoring api/, public/, and update-api-index.ts is reasonable for generated/assets; confirm you still lint other docs scripts.

Would you like to also lint update-api-index.ts (it’s currently ignored) to catch regressions in docs tooling?

docs/package.json (1)

7-16: Scripts align with docs workflow.

lint/format wiring through ESLint is consistent with the new config.

docs/guide/environment-variables.md (2)

33-35: Default directory note LGTM; please confirm version detail.

The “Claude Code v1.0.30+” detail may drift; confirm accuracy in release notes.


79-86: Log levels table reformat LGTM.

Clearer multi‑column layout; semantics unchanged.

docs/CLAUDE.md (2)

15-21: Docs workflow updates LGTM.

New lint/format commands match package.json and ESLint setup.


46-55: Guidelines align with repo rules.

Screenshot placement, root‑relative image paths, and alt text are clearly documented.

docs/.vitepress/config.ts (1)

31-47: Resolved — logo.svg present in docs/public

Found at docs/public/logo.svg; no action required.

Comment on lines +15 to +16
"typecheck": "tsgo --noEmit"
},
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

🧩 Analysis chain

Verify tsgo availability.

Ensure tsgo is present in the repo toolchain so typecheck doesn’t fail locally/CI.


🏁 Script executed:

#!/bin/bash
# Check if `tsgo` is referenced anywhere (tools, package.json, lockfiles)
rg -n -C2 '\btsgo\b'

Length of output: 2180


Add or remove references to tsgo in the repo toolchain

Multiple package.json scripts call tsgo --noEmit but there’s no tsgo entry in repo deps/lockfiles — either add tsgo to the workspace (root) or per-package devDependencies, or change the scripts to use an available typechecker.

Affected files:

  • packages/internal/package.json
  • packages/terminal/package.json
  • apps/codex/package.json
  • apps/mcp/package.json
  • apps/ccusage/package.json
  • docs/package.json

"types": [
"bun"
],
"allowImportingTsExtensions": false,
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

allowImportingTsExtensions=false conflicts with repo rule for explicit .ts imports.

Set it to true so local imports can use explicit .ts extensions as required.

-    "allowImportingTsExtensions": false,
+    "allowImportingTsExtensions": true,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"allowImportingTsExtensions": false,
"allowImportingTsExtensions": true,
🤖 Prompt for AI Agents
In docs/tsconfig.json around line 8, the compiler option
"allowImportingTsExtensions" is set to false which conflicts with the repo rule
requiring explicit .ts file extensions in local imports; change the value to
true so the TypeScript compiler permits importing modules with explicit .ts
extensions and update/save the tsconfig.json accordingly.

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.

2 participants