Skip to content

Conversation

@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Dec 2, 2025

Summary by CodeRabbit

  • Chores
    • Enhanced linting across the repo to include type-checking, improving early detection of type issues.
    • Upgraded lint tooling versions to support the new checks.
    • Updated templates and tooling scripts to align with the enhanced lint setup.
    • Adjusted lint configuration to ignore additional template paths.
    • Minor documentation updates to reflect the updated lint behavior.

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

@fengmk2 fengmk2 requested a review from Copilot December 2, 2025 11:10
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 2, 2025

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

Updated oxlint invocations to include the --type-check flag across documentation, root and package scripts, templates, and workspace catalog; pnpm-workspace.yaml bumped oxlint and oxlint-tsgolint versions; simple-ts template added a prepublishOnly script.

Changes

Cohort / File(s) Summary
Documentation
AGENTS.md, CLAUDE.md
Updated lint command examples from oxlint --type-aware to oxlint --type-aware --type-check.
Root config & scripts
package.json, pnpm-workspace.yaml
Added --type-check to root lint script and lint-staged TS handler; bumped oxlint to ^1.31.0 and oxlint-tsgolint to ^0.8.3 in pnpm-workspace.yaml.
Packages (monorepo)
packages/*/package.json
\packages/cookies/package.json`, `packages/errors/package.json`, `packages/koa/package.json`, `packages/koa-static-cache/package.json`, `packages/path-matching/package.json`, `packages/router/package.json`, `packages/supertest/package.json`, `packages/utils/package.json``
Updated each package's lint script to oxlint --type-aware --type-check.
Plugins
plugins/*/package.json
\plugins/development/package.json`, `plugins/i18n/package.json`, `plugins/jsonp/package.json`, `plugins/logrotator/package.json`, `plugins/multipart/package.json`, `plugins/onerror/package.json`, `plugins/redis/package.json`, `plugins/schedule/package.json`, `plugins/security/package.json`, `plugins/session/package.json`, `plugins/static/package.json`, `plugins/tracer/package.json`, `plugins/typebox-validate/package.json`, `plugins/view-nunjucks/package.json`, `plugins/view/package.json`, `plugins/watcher/package.json``
Updated each plugin's lint script to oxlint --type-aware --type-check.
Tools & templates
tools/*/package.json and templates
\tools/create-egg/src/templates/*/package.json`, `tools/egg-bin/package.json`, `tools/scripts/package.json``
Updated lint scripts in templates and tools to include --type-check; tools/create-egg/src/templates/simple-ts/package.json also added a prepublishOnly script (npm run clean && npm run tsc).
Oxlint config
.oxlintrc.json
Expanded ignorePatterns to also ignore tools/create-egg/src/templates.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Verify all package/plugin/tool lint scripts uniformly include --type-check with no typos.
  • Confirm pnpm-workspace.yaml version bumps target the intended catalog entries.
  • Review the new prepublishOnly in the simple-ts template for correctness.

Possibly related PRs

Poem

🐰 I hopped through scripts both far and near,

Adding checks so types appear,
From templates up to workspace tree,
Oxlint tighter — tidy as can be,
A carrot for CI, a celebratory cheer! 🥕✨

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 'chore: enable oxlint type check' accurately summarizes the main change: enabling type checking in the oxlint linter across the project by adding --type-check flags.
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 enable-oxlint-type-check

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fc99904 and e0f08ff.

📒 Files selected for processing (1)
  • .oxlintrc.json (1 hunks)
🧰 Additional context used
🧠 Learnings (12)
📓 Common learnings
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Use oxlint with `--type-aware` flag for linting across all packages instead of ESLint
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/core/*/package.json : Include standard build scripts in package.json: typecheck, clean, and build with tsdown and tsc
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-27T14:39:09.305Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use two-space indentation, trailing commas, and semicolons enforced by Prettier and oxlint
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/package.json,plugins/*/package.json,tools/*/package.json} : Include `build`, `typecheck`, `lint`, `test`, and `prepublishOnly` scripts in all package.json files
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Build all packages first using 'pnpm run build' before making changes, then validate with lint, tests, and documentation site checks
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/package.json,plugins/*/package.json,tools/*/package.json} : Use catalog: for external dependencies defined in pnpm-workspace.yaml
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Use `tsc --noEmit` for pure TypeScript type checking in all packages
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/tsconfig.json,plugins/*/tsconfig.json,tools/*/tsconfig.json} : Enable strict mode in all TypeScript packages
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {.eslintrc,.eslintrc.js,.eslintrc.json} : Remove `.eslintrc`, `.eslintrc.js`, and `.eslintrc.json` files when migrating packages to oxlint
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to tools/egg-bin/tsconfig.json : Set `isolatedDeclarations: false` in tsconfig.json for oclif CLI tools (tools/egg-bin) due to Flags API incompatibility
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {.eslintrc,.eslintrc.js,.eslintrc.json} : Remove `.eslintrc`, `.eslintrc.js`, and `.eslintrc.json` files when migrating packages to oxlint

Applied to files:

  • .oxlintrc.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to tools/egg-bin/tsconfig.json : Set `isolatedDeclarations: false` in tsconfig.json for oclif CLI tools (tools/egg-bin) due to Flags API incompatibility

Applied to files:

  • .oxlintrc.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/!(egg|cookies)/test/**/*.test.ts,plugins/*/test/**/*.test.ts,tools/!(egg-bin)/test/**/*.test.ts} : All new packages MUST use Vitest for testing (exception: egg-bin and cookies packages use Mocha)

Applied to files:

  • .oxlintrc.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Follow standard Egg plugin structure with `src/`, `test/`, `package.json`, and `tsdown.config.ts` files

Applied to files:

  • .oxlintrc.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/cookies/test/**/*.test.ts,tools/egg-bin/test/**/*.test.ts} : Use Mocha test framework for egg-bin and cookies packages

Applied to files:

  • .oxlintrc.json
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/core/*/package.json : Include standard build scripts in package.json: typecheck, clean, and build with tsdown and tsc

Applied to files:

  • .oxlintrc.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/package.json,plugins/*/package.json,tools/*/package.json} : Include `build`, `typecheck`, `lint`, `test`, and `prepublishOnly` scripts in all package.json files

Applied to files:

  • .oxlintrc.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to plugins/*/package.json : Plugin package.json MUST include egg in peerDependencies to ensure framework compatibility

Applied to files:

  • .oxlintrc.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/tsconfig.json,plugins/*/tsconfig.json,tools/*/tsconfig.json} : Enable strict mode in all TypeScript packages

Applied to files:

  • .oxlintrc.json
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/core/*/tsconfig.json : Include tsconfig.json extending eggjs/tsconfig in each core package

Applied to files:

  • .oxlintrc.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to plugins/*/tsdown.config.ts : All plugins MUST use this tsdown configuration template with entry pattern `src/**/*.ts`, `unbundle: true`, `dts: true`, and `exports.devExports: true`

Applied to files:

  • .oxlintrc.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). (22)
  • GitHub Check: Socket Security: Pull Request Alerts
  • GitHub Check: Test (ubuntu-latest, 22, 2/3)
  • GitHub Check: Test (windows-latest, 22, 2/3)
  • GitHub Check: Test (ubuntu-latest, 22, 3/3)
  • GitHub Check: Test (ubuntu-latest, 24, 1/3)
  • GitHub Check: Test (ubuntu-latest, 22, 1/3)
  • GitHub Check: Test (macos-latest, 22, 3/3)
  • GitHub Check: Test (macos-latest, 22, 2/3)
  • GitHub Check: Test (windows-latest, 24, 1/3)
  • GitHub Check: Test (macos-latest, 24, 2/3)
  • GitHub Check: Test (windows-latest, 22, 3/3)
  • GitHub Check: Test (windows-latest, 22, 1/3)
  • GitHub Check: Test (macos-latest, 24, 1/3)
  • GitHub Check: Test (ubuntu-latest, 24, 2/3)
  • GitHub Check: Test bin (windows-latest, 22, 2/3)
  • GitHub Check: Test bin (windows-latest, 22, 0/3)
  • GitHub Check: Test bin (ubuntu-latest, 22, 2/3)
  • GitHub Check: Test bin (ubuntu-latest, 22, 0/3)
  • GitHub Check: Test bin (ubuntu-latest, 22, 1/3)
  • GitHub Check: Test bin (windows-latest, 22, 1/3)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Cloudflare Pages: egg-v3
🔇 Additional comments (1)
.oxlintrc.json (1)

6-6: Add rationale for ignoring template directory.

The addition of tools/create-egg/src/templates to ignorePatterns is likely necessary because template files (used for code generation) may contain example or non-strict TypeScript that conflicts with type checking. However, the PR description and commit message should clarify why this specific directory needs exemption when enabling type checking.

Please confirm: Does ignoring tools/create-egg/src/templates prevent type-checking errors in template files that aren't meant to be strictly typed (e.g., code generation examples)?


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.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 2, 2025

Deploying egg with  Cloudflare Pages  Cloudflare Pages

Latest commit: e0f08ff
Status: ✅  Deploy successful!
Preview URL: https://1d6d738a.egg-cci.pages.dev
Branch Preview URL: https://enable-oxlint-type-check.egg-cci.pages.dev

View logs

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @fengmk2, 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 significantly enhances the project's code quality and maintainability by enabling full type checking with Oxlint. By integrating the --type-check flag into all linting processes and updating related dependencies, the project ensures a more robust and type-safe codebase, aligning documentation with the new standards.

Highlights

  • Oxlint Type Checking Enabled: The primary change is the activation of type checking within Oxlint across the entire project. This is achieved by adding the --type-check flag to all oxlint commands in package.json scripts and documentation.
  • Dependency Updates: The oxlint dependency has been upgraded from version 1.25.0 to 1.31.0, and oxlint-tsgolint from 0.8.0 to 0.8.3. This includes updates to platform-specific oxlint packages and their integrity hashes in pnpm-lock.yaml.
  • Documentation Alignment: Project documentation, specifically AGENTS.md and CLAUDE.md, has been updated to reflect the new oxlint --type-aware --type-check command, ensuring consistency with the enforced coding style and linting guidelines.
  • Monorepo-wide Configuration: The change is applied consistently across the monorepo, affecting the root package.json, numerous package-specific package.json files (e.g., packages/cookies, plugins/development), and project templates under tools/create-egg.
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.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 2, 2025

Deploying egg-v3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: e0f08ff
Status: ✅  Deploy successful!
Preview URL: https://119319bc.egg-v3.pages.dev
Branch Preview URL: https://enable-oxlint-type-check.egg-v3.pages.dev

View logs

@codecov
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.40%. Comparing base (fa85b8c) to head (e0f08ff).
⚠️ Report is 3 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #5712      +/-   ##
==========================================
- Coverage   87.41%   87.40%   -0.01%     
==========================================
  Files         561      561              
  Lines       10932    10932              
  Branches     1238     1238              
==========================================
- Hits         9556     9555       -1     
- Misses       1292     1293       +1     
  Partials       84       84              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@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

🧹 Nitpick comments (1)
tools/create-egg/src/templates/egg3-tegg/package.json (1)

17-20: Verify template includes typecheck script.

The lint script is properly updated, but this template appears to lack an explicit "typecheck": "tsc --noEmit" script. Per coding guidelines, all packages should include separate build, typecheck, lint, test, and prepublishOnly scripts. Consider adding:

"typecheck": "tsc --noEmit",

This would align with the pattern used in other package.json files and ensure consistency across generated projects.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fa85b8c and fc99904.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (33)
  • AGENTS.md (1 hunks)
  • CLAUDE.md (5 hunks)
  • package.json (2 hunks)
  • packages/cookies/package.json (1 hunks)
  • packages/errors/package.json (1 hunks)
  • packages/koa-static-cache/package.json (1 hunks)
  • packages/koa/package.json (1 hunks)
  • packages/path-matching/package.json (1 hunks)
  • packages/router/package.json (1 hunks)
  • packages/supertest/package.json (1 hunks)
  • packages/utils/package.json (1 hunks)
  • plugins/development/package.json (1 hunks)
  • plugins/i18n/package.json (1 hunks)
  • plugins/jsonp/package.json (1 hunks)
  • plugins/logrotator/package.json (1 hunks)
  • plugins/multipart/package.json (1 hunks)
  • plugins/onerror/package.json (1 hunks)
  • plugins/redis/package.json (1 hunks)
  • plugins/schedule/package.json (1 hunks)
  • plugins/security/package.json (1 hunks)
  • plugins/session/package.json (1 hunks)
  • plugins/static/package.json (1 hunks)
  • plugins/tracer/package.json (1 hunks)
  • plugins/typebox-validate/package.json (1 hunks)
  • plugins/view-nunjucks/package.json (1 hunks)
  • plugins/view/package.json (1 hunks)
  • plugins/watcher/package.json (1 hunks)
  • pnpm-workspace.yaml (1 hunks)
  • tools/create-egg/src/templates/egg3-tegg/package.json (1 hunks)
  • tools/create-egg/src/templates/simple-ts/package.json (1 hunks)
  • tools/create-egg/src/templates/tegg/package.json (1 hunks)
  • tools/egg-bin/package.json (1 hunks)
  • tools/scripts/package.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
plugins/*/package.json

📄 CodeRabbit inference engine (CLAUDE.md)

plugins/*/package.json: Plugin package.json MUST include egg in peerDependencies to ensure framework compatibility
Configure publishConfig.exports in plugin package.json to override exports during npm publish

Files:

  • plugins/redis/package.json
  • plugins/watcher/package.json
  • plugins/schedule/package.json
  • plugins/multipart/package.json
  • plugins/jsonp/package.json
  • plugins/session/package.json
  • plugins/onerror/package.json
  • plugins/view-nunjucks/package.json
  • plugins/development/package.json
  • plugins/logrotator/package.json
  • plugins/static/package.json
  • plugins/security/package.json
  • plugins/view/package.json
  • plugins/i18n/package.json
  • plugins/tracer/package.json
  • plugins/typebox-validate/package.json
{packages/*/package.json,plugins/*/package.json,tools/*/package.json}

📄 CodeRabbit inference engine (CLAUDE.md)

{packages/*/package.json,plugins/*/package.json,tools/*/package.json}: Use workspace:* for internal package dependencies in package.json
Use catalog: for external dependencies defined in pnpm-workspace.yaml
Set type: module in package.json for ESM packages
Include build, typecheck, lint, test, and prepublishOnly scripts in all package.json files

Files:

  • plugins/redis/package.json
  • plugins/watcher/package.json
  • plugins/schedule/package.json
  • packages/cookies/package.json
  • plugins/multipart/package.json
  • plugins/jsonp/package.json
  • plugins/session/package.json
  • plugins/onerror/package.json
  • plugins/view-nunjucks/package.json
  • packages/supertest/package.json
  • plugins/development/package.json
  • tools/egg-bin/package.json
  • plugins/logrotator/package.json
  • packages/path-matching/package.json
  • packages/router/package.json
  • plugins/static/package.json
  • plugins/security/package.json
  • plugins/view/package.json
  • packages/koa-static-cache/package.json
  • plugins/i18n/package.json
  • plugins/tracer/package.json
  • plugins/typebox-validate/package.json
  • tools/scripts/package.json
  • packages/utils/package.json
  • packages/koa/package.json
  • packages/errors/package.json
package.json

📄 CodeRabbit inference engine (AGENTS.md)

Keep local Node.js and pnpm versions aligned with the repo's packageManager field in configuration files

Files:

  • package.json
pnpm-workspace.yaml

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Define dependencies in pnpm-workspace.yaml catalog section and reference catalog entries with 'package-name': 'catalog:' or internal workspace dependencies with 'package-name': 'workspace:*'

Files:

  • pnpm-workspace.yaml
🧠 Learnings (44)
📓 Common learnings
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Use oxlint with `--type-aware` flag for linting across all packages instead of ESLint
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-27T14:39:09.305Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use two-space indentation, trailing commas, and semicolons enforced by Prettier and oxlint
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-27T14:39:09.305Z
Learning: Ensure PRs pass lint, typecheck, and tests before submission
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/core/*/package.json : Include standard build scripts in package.json: typecheck, clean, and build with tsdown and tsc
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {.eslintrc,.eslintrc.js,.eslintrc.json} : Remove `.eslintrc`, `.eslintrc.js`, and `.eslintrc.json` files when migrating packages to oxlint
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to tools/egg-bin/tsconfig.json : Set `isolatedDeclarations: false` in tsconfig.json for oclif CLI tools (tools/egg-bin) due to Flags API incompatibility
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Use oxlint with `--type-aware` flag for linting across all packages instead of ESLint

Applied to files:

  • plugins/redis/package.json
  • plugins/watcher/package.json
  • plugins/schedule/package.json
  • tools/create-egg/src/templates/egg3-tegg/package.json
  • packages/cookies/package.json
  • plugins/multipart/package.json
  • package.json
  • plugins/jsonp/package.json
  • plugins/session/package.json
  • tools/create-egg/src/templates/tegg/package.json
  • CLAUDE.md
  • plugins/onerror/package.json
  • plugins/view-nunjucks/package.json
  • packages/supertest/package.json
  • pnpm-workspace.yaml
  • plugins/development/package.json
  • tools/egg-bin/package.json
  • plugins/logrotator/package.json
  • packages/path-matching/package.json
  • packages/router/package.json
  • plugins/static/package.json
  • plugins/security/package.json
  • plugins/view/package.json
  • packages/koa-static-cache/package.json
  • plugins/i18n/package.json
  • plugins/tracer/package.json
  • plugins/typebox-validate/package.json
  • tools/scripts/package.json
  • packages/utils/package.json
  • packages/koa/package.json
  • tools/create-egg/src/templates/simple-ts/package.json
  • packages/errors/package.json
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/core/*/package.json : Include standard build scripts in package.json: typecheck, clean, and build with tsdown and tsc

Applied to files:

  • plugins/redis/package.json
  • plugins/watcher/package.json
  • plugins/schedule/package.json
  • tools/create-egg/src/templates/egg3-tegg/package.json
  • packages/cookies/package.json
  • plugins/multipart/package.json
  • package.json
  • plugins/jsonp/package.json
  • plugins/session/package.json
  • tools/create-egg/src/templates/tegg/package.json
  • CLAUDE.md
  • plugins/onerror/package.json
  • plugins/view-nunjucks/package.json
  • packages/supertest/package.json
  • plugins/development/package.json
  • tools/egg-bin/package.json
  • plugins/logrotator/package.json
  • packages/path-matching/package.json
  • packages/router/package.json
  • plugins/static/package.json
  • plugins/security/package.json
  • plugins/view/package.json
  • packages/koa-static-cache/package.json
  • plugins/i18n/package.json
  • plugins/tracer/package.json
  • plugins/typebox-validate/package.json
  • tools/scripts/package.json
  • packages/utils/package.json
  • packages/koa/package.json
  • tools/create-egg/src/templates/simple-ts/package.json
  • packages/errors/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/package.json,plugins/*/package.json,tools/*/package.json} : Include `build`, `typecheck`, `lint`, `test`, and `prepublishOnly` scripts in all package.json files

Applied to files:

  • plugins/redis/package.json
  • plugins/watcher/package.json
  • plugins/schedule/package.json
  • tools/create-egg/src/templates/egg3-tegg/package.json
  • packages/cookies/package.json
  • plugins/multipart/package.json
  • package.json
  • plugins/jsonp/package.json
  • plugins/session/package.json
  • tools/create-egg/src/templates/tegg/package.json
  • CLAUDE.md
  • plugins/onerror/package.json
  • plugins/view-nunjucks/package.json
  • packages/supertest/package.json
  • plugins/development/package.json
  • tools/egg-bin/package.json
  • plugins/logrotator/package.json
  • packages/path-matching/package.json
  • packages/router/package.json
  • plugins/static/package.json
  • plugins/security/package.json
  • plugins/view/package.json
  • packages/koa-static-cache/package.json
  • plugins/i18n/package.json
  • plugins/tracer/package.json
  • plugins/typebox-validate/package.json
  • tools/scripts/package.json
  • packages/utils/package.json
  • packages/koa/package.json
  • tools/create-egg/src/templates/simple-ts/package.json
  • packages/errors/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Use `tsc --noEmit` for pure TypeScript type checking in all packages

Applied to files:

  • plugins/redis/package.json
  • plugins/watcher/package.json
  • plugins/schedule/package.json
  • tools/create-egg/src/templates/egg3-tegg/package.json
  • packages/cookies/package.json
  • plugins/multipart/package.json
  • package.json
  • plugins/jsonp/package.json
  • plugins/session/package.json
  • tools/create-egg/src/templates/tegg/package.json
  • CLAUDE.md
  • plugins/onerror/package.json
  • plugins/view-nunjucks/package.json
  • packages/supertest/package.json
  • plugins/development/package.json
  • tools/egg-bin/package.json
  • plugins/logrotator/package.json
  • packages/path-matching/package.json
  • packages/router/package.json
  • plugins/static/package.json
  • plugins/security/package.json
  • plugins/view/package.json
  • packages/koa-static-cache/package.json
  • plugins/i18n/package.json
  • plugins/tracer/package.json
  • plugins/typebox-validate/package.json
  • tools/scripts/package.json
  • packages/utils/package.json
  • packages/koa/package.json
  • tools/create-egg/src/templates/simple-ts/package.json
  • packages/errors/package.json
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Build all packages first using 'pnpm run build' before making changes, then validate with lint, tests, and documentation site checks

Applied to files:

  • plugins/redis/package.json
  • plugins/schedule/package.json
  • tools/create-egg/src/templates/egg3-tegg/package.json
  • packages/cookies/package.json
  • plugins/multipart/package.json
  • package.json
  • plugins/jsonp/package.json
  • plugins/session/package.json
  • tools/create-egg/src/templates/tegg/package.json
  • CLAUDE.md
  • plugins/onerror/package.json
  • plugins/view-nunjucks/package.json
  • packages/supertest/package.json
  • plugins/development/package.json
  • tools/egg-bin/package.json
  • plugins/logrotator/package.json
  • packages/path-matching/package.json
  • packages/router/package.json
  • plugins/static/package.json
  • plugins/security/package.json
  • plugins/view/package.json
  • packages/koa-static-cache/package.json
  • plugins/i18n/package.json
  • plugins/tracer/package.json
  • plugins/typebox-validate/package.json
  • tools/scripts/package.json
  • packages/utils/package.json
  • packages/koa/package.json
  • tools/create-egg/src/templates/simple-ts/package.json
  • packages/errors/package.json
📚 Learning: 2025-11-27T14:39:09.305Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-27T14:39:09.305Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use two-space indentation, trailing commas, and semicolons enforced by Prettier and oxlint

Applied to files:

  • plugins/redis/package.json
  • plugins/schedule/package.json
  • tools/create-egg/src/templates/egg3-tegg/package.json
  • packages/cookies/package.json
  • plugins/multipart/package.json
  • AGENTS.md
  • package.json
  • plugins/jsonp/package.json
  • plugins/session/package.json
  • tools/create-egg/src/templates/tegg/package.json
  • CLAUDE.md
  • plugins/onerror/package.json
  • plugins/view-nunjucks/package.json
  • packages/supertest/package.json
  • plugins/development/package.json
  • tools/egg-bin/package.json
  • plugins/logrotator/package.json
  • packages/path-matching/package.json
  • plugins/static/package.json
  • plugins/security/package.json
  • packages/koa-static-cache/package.json
  • plugins/i18n/package.json
  • plugins/typebox-validate/package.json
  • tools/scripts/package.json
  • packages/utils/package.json
  • packages/koa/package.json
  • tools/create-egg/src/templates/simple-ts/package.json
  • packages/errors/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to plugins/*/tsdown.config.ts : All plugins MUST use this tsdown configuration template with entry pattern `src/**/*.ts`, `unbundle: true`, `dts: true`, and `exports.devExports: true`

Applied to files:

  • plugins/redis/package.json
  • plugins/watcher/package.json
  • plugins/schedule/package.json
  • packages/cookies/package.json
  • plugins/multipart/package.json
  • AGENTS.md
  • plugins/jsonp/package.json
  • plugins/session/package.json
  • CLAUDE.md
  • plugins/view-nunjucks/package.json
  • packages/supertest/package.json
  • plugins/logrotator/package.json
  • packages/path-matching/package.json
  • plugins/static/package.json
  • plugins/security/package.json
  • packages/koa-static-cache/package.json
  • plugins/i18n/package.json
  • plugins/typebox-validate/package.json
  • tools/scripts/package.json
  • packages/koa/package.json
  • packages/errors/package.json
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Run bootstrap and build commands in sequence: corepack enable pnpm → pnpm install → pnpm run build → pnpm run lint

Applied to files:

  • plugins/redis/package.json
  • plugins/schedule/package.json
  • tools/create-egg/src/templates/egg3-tegg/package.json
  • packages/cookies/package.json
  • plugins/multipart/package.json
  • package.json
  • plugins/jsonp/package.json
  • plugins/session/package.json
  • tools/create-egg/src/templates/tegg/package.json
  • CLAUDE.md
  • plugins/view-nunjucks/package.json
  • packages/supertest/package.json
  • tools/egg-bin/package.json
  • plugins/logrotator/package.json
  • packages/path-matching/package.json
  • plugins/static/package.json
  • plugins/security/package.json
  • packages/koa-static-cache/package.json
  • plugins/i18n/package.json
  • plugins/typebox-validate/package.json
  • tools/scripts/package.json
  • packages/koa/package.json
  • tools/create-egg/src/templates/simple-ts/package.json
  • packages/errors/package.json
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to packages/*/tsdown.config.ts : Use tsdown for unbundled ESM builds that preserves file structure; configure via tsdown.config.ts in each package

Applied to files:

  • plugins/redis/package.json
  • plugins/multipart/package.json
  • AGENTS.md
  • plugins/jsonp/package.json
  • plugins/session/package.json
  • CLAUDE.md
  • plugins/view-nunjucks/package.json
  • packages/supertest/package.json
  • plugins/logrotator/package.json
  • packages/path-matching/package.json
  • plugins/security/package.json
  • plugins/i18n/package.json
  • plugins/typebox-validate/package.json
  • tools/scripts/package.json
  • packages/koa/package.json
  • packages/errors/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/!(egg|cookies)/test/**/*.test.ts,plugins/*/test/**/*.test.ts,tools/!(egg-bin)/test/**/*.test.ts} : All new packages MUST use Vitest for testing (exception: egg-bin and cookies packages use Mocha)

Applied to files:

  • plugins/redis/package.json
  • plugins/watcher/package.json
  • plugins/schedule/package.json
  • tools/create-egg/src/templates/egg3-tegg/package.json
  • packages/cookies/package.json
  • plugins/multipart/package.json
  • plugins/jsonp/package.json
  • plugins/session/package.json
  • tools/create-egg/src/templates/tegg/package.json
  • CLAUDE.md
  • plugins/onerror/package.json
  • plugins/view-nunjucks/package.json
  • packages/supertest/package.json
  • plugins/development/package.json
  • tools/egg-bin/package.json
  • plugins/logrotator/package.json
  • packages/path-matching/package.json
  • packages/router/package.json
  • plugins/static/package.json
  • plugins/security/package.json
  • plugins/view/package.json
  • packages/koa-static-cache/package.json
  • plugins/i18n/package.json
  • plugins/tracer/package.json
  • plugins/typebox-validate/package.json
  • tools/scripts/package.json
  • packages/utils/package.json
  • packages/koa/package.json
  • tools/create-egg/src/templates/simple-ts/package.json
  • packages/errors/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/package.json,plugins/*/package.json,tools/*/package.json} : Set `type: module` in package.json for ESM packages

Applied to files:

  • plugins/watcher/package.json
  • plugins/multipart/package.json
  • tools/egg-bin/package.json
  • plugins/static/package.json
  • plugins/security/package.json
  • plugins/typebox-validate/package.json
  • tools/scripts/package.json
  • packages/errors/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Follow standard Egg plugin structure with `src/`, `test/`, `package.json`, and `tsdown.config.ts` files

Applied to files:

  • plugins/watcher/package.json
  • AGENTS.md
  • CLAUDE.md
  • packages/utils/package.json
  • tools/create-egg/src/templates/simple-ts/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to plugins/*/src/types.ts : All plugins MUST include a `src/types.ts` file that extends Egg module declarations using module augmentation

Applied to files:

  • plugins/watcher/package.json
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/plugin/*/package.json : Define eggPlugin in package.json and create app.ts for initialization in plugin packages

Applied to files:

  • plugins/watcher/package.json
  • tools/create-egg/src/templates/egg3-tegg/package.json
  • tools/create-egg/src/templates/tegg/package.json
  • CLAUDE.md
  • tools/create-egg/src/templates/simple-ts/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to plugins/*/src/types.ts : Module augmentation in plugin types.ts MUST extend the 'egg' module using `declare module 'egg'`

Applied to files:

  • plugins/watcher/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to plugins/*/package.json : Plugin package.json MUST include egg in peerDependencies to ensure framework compatibility

Applied to files:

  • plugins/watcher/package.json
  • tools/create-egg/src/templates/egg3-tegg/package.json
  • tools/create-egg/src/templates/tegg/package.json
  • CLAUDE.md
  • tools/egg-bin/package.json
  • tools/create-egg/src/templates/simple-ts/package.json
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to packages/**/*.ts : Use TypeScript throughout all packages in the Eggjs monorepo

Applied to files:

  • plugins/watcher/package.json
  • CLAUDE.md
  • packages/supertest/package.json
  • tools/egg-bin/package.json
  • packages/utils/package.json
  • tools/create-egg/src/templates/simple-ts/package.json
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/*.{test,spec}.{ts,tsx} : Use Vitest for testing all tegg packages with configuration from monorepo root vitest.config.ts

Applied to files:

  • plugins/schedule/package.json
  • packages/cookies/package.json
  • package.json
  • CLAUDE.md
  • plugins/onerror/package.json
  • packages/supertest/package.json
  • plugins/development/package.json
  • packages/router/package.json
  • plugins/static/package.json
  • plugins/view/package.json
  • packages/koa-static-cache/package.json
  • plugins/tracer/package.json
  • tools/create-egg/src/templates/simple-ts/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {.eslintrc,.eslintrc.js,.eslintrc.json} : Remove `.eslintrc`, `.eslintrc.js`, and `.eslintrc.json` files when migrating packages to oxlint

Applied to files:

  • tools/create-egg/src/templates/egg3-tegg/package.json
  • plugins/multipart/package.json
  • package.json
  • plugins/jsonp/package.json
  • plugins/session/package.json
  • tools/create-egg/src/templates/tegg/package.json
  • CLAUDE.md
  • plugins/onerror/package.json
  • packages/supertest/package.json
  • pnpm-workspace.yaml
  • plugins/development/package.json
  • tools/egg-bin/package.json
  • plugins/logrotator/package.json
  • packages/path-matching/package.json
  • packages/router/package.json
  • plugins/static/package.json
  • plugins/security/package.json
  • plugins/view/package.json
  • plugins/i18n/package.json
  • tools/scripts/package.json
  • packages/utils/package.json
  • packages/koa/package.json
  • tools/create-egg/src/templates/simple-ts/package.json
  • packages/errors/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to tools/egg-bin/tsconfig.json : Set `isolatedDeclarations: false` in tsconfig.json for oclif CLI tools (tools/egg-bin) due to Flags API incompatibility

Applied to files:

  • tools/create-egg/src/templates/egg3-tegg/package.json
  • package.json
  • tools/create-egg/src/templates/tegg/package.json
  • tools/egg-bin/package.json
  • plugins/security/package.json
  • tools/scripts/package.json
  • packages/utils/package.json
  • tools/create-egg/src/templates/simple-ts/package.json
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/package.json : Use `workspace:*` protocol for internal tegg and egg monorepo dependencies in package.json

Applied to files:

  • tools/create-egg/src/templates/egg3-tegg/package.json
  • tools/create-egg/src/templates/tegg/package.json
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/core/*/tsconfig.json : Include tsconfig.json extending eggjs/tsconfig in each core package

Applied to files:

  • tools/create-egg/src/templates/egg3-tegg/package.json
  • tools/create-egg/src/templates/tegg/package.json
  • packages/utils/package.json
  • tools/create-egg/src/templates/simple-ts/package.json
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/package.json : Use `catalog:` protocol for shared external dependencies in package.json

Applied to files:

  • tools/create-egg/src/templates/egg3-tegg/package.json
  • tools/create-egg/src/templates/tegg/package.json
  • pnpm-workspace.yaml
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/cookies/test/**/*.test.ts,tools/egg-bin/test/**/*.test.ts} : Use Mocha test framework for egg-bin and cookies packages

Applied to files:

  • packages/cookies/package.json
  • CLAUDE.md
  • packages/supertest/package.json
  • tools/egg-bin/package.json
  • packages/utils/package.json
📚 Learning: 2025-11-27T14:39:09.305Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-27T14:39:09.305Z
Learning: Applies to **/*.{js,jsx,cjs,mjs} : Prefer `.ts` sources and exports over CommonJS in the ESM-first, TypeScript-heavy repository

Applied to files:

  • AGENTS.md
  • package.json
📚 Learning: 2025-11-27T14:39:09.305Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-27T14:39:09.305Z
Learning: Applies to **/*.{ts,tsx} : Re-export types thoughtfully to keep the public API stable

Applied to files:

  • AGENTS.md
  • package.json
📚 Learning: 2025-11-27T14:39:09.305Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-27T14:39:09.305Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Name files in lowercase with hyphens (e.g., `loader-context.ts`)

Applied to files:

  • AGENTS.md
  • package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to **/*.ts : Use `export` statements instead of `module.exports` in ESM packages

Applied to files:

  • AGENTS.md
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to **/*.ts : Use `import` statements instead of `require()` in ESM packages

Applied to files:

  • AGENTS.md
📚 Learning: 2025-11-27T14:39:09.305Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-27T14:39:09.305Z
Learning: Applies to **/*.{ts,tsx,js} : Name functions and variables in camelCase

Applied to files:

  • AGENTS.md
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to **/*.ts : Use explicit return types for all exported functions, methods, and getters to support TypeScript's isolatedDeclarations flag

Applied to files:

  • package.json
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Run 'pnpm run build' after making changes (set timeout to 60+ seconds) and never cancel the command

Applied to files:

  • package.json
  • CLAUDE.md
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Run 'pnpm run test' to validate changes (set timeout to 180+ seconds for all tests, 120+ seconds for coverage) and never cancel the command

Applied to files:

  • package.json
  • CLAUDE.md
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/tsconfig.json,plugins/*/tsconfig.json,tools/*/tsconfig.json} : Enable strict mode in all TypeScript packages

Applied to files:

  • package.json
  • CLAUDE.md
  • plugins/security/package.json
  • plugins/tracer/package.json
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Use package-specific filter commands 'pnpm --filter=<package> run <command>' to run commands for specific packages

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/package.json,plugins/*/package.json,tools/*/package.json} : Use catalog: for external dependencies defined in pnpm-workspace.yaml

Applied to files:

  • CLAUDE.md
  • pnpm-workspace.yaml
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to packages/**/test/**/*.test.ts : Use Vitest as the standard test runner for all packages; test files follow pattern 'test/**/*.test.ts'

Applied to files:

  • CLAUDE.md
  • plugins/onerror/package.json
  • plugins/development/package.json
  • packages/router/package.json
  • plugins/view/package.json
  • plugins/tracer/package.json
  • tools/create-egg/src/templates/simple-ts/package.json
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to packages/**/test/**/*.test.ts : Use 'import { describe, it } from "vitest"' for test functions in Vitest test files

Applied to files:

  • CLAUDE.md
  • packages/router/package.json
  • plugins/view/package.json
  • plugins/tracer/package.json
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to packages/**/*.ts : Use strict TypeScript mode in all packages

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to **/*.test.ts : Import test functions from vitest using `import { describe, it } from 'vitest'` in Vitest test files

Applied to files:

  • plugins/onerror/package.json
  • packages/router/package.json
  • plugins/view/package.json
  • plugins/tracer/package.json
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to pnpm-workspace.yaml : Define dependencies in pnpm-workspace.yaml catalog section and reference catalog entries with 'package-name': 'catalog:' or internal workspace dependencies with 'package-name': 'workspace:*'

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/package.json,plugins/*/package.json,tools/*/package.json} : Use workspace:* for internal package dependencies in package.json

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: All packages in this monorepo require Node.js >= 22.18.0

Applied to files:

  • plugins/development/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). (23)
  • GitHub Check: Socket Security: Pull Request Alerts
  • GitHub Check: Socket Security: Project Report
  • GitHub Check: Test (windows-latest, 22, 3/3)
  • GitHub Check: Test (ubuntu-latest, 24, 2/3)
  • GitHub Check: Test (windows-latest, 24, 3/3)
  • GitHub Check: Test (ubuntu-latest, 22, 1/3)
  • GitHub Check: Test (windows-latest, 24, 1/3)
  • GitHub Check: Test (macos-latest, 24, 1/3)
  • GitHub Check: Test (windows-latest, 22, 2/3)
  • GitHub Check: Test (macos-latest, 24, 3/3)
  • GitHub Check: Test (ubuntu-latest, 24, 1/3)
  • GitHub Check: Test bin (ubuntu-latest, 22, 1/3)
  • GitHub Check: Test (windows-latest, 22, 1/3)
  • GitHub Check: Test (macos-latest, 24, 2/3)
  • GitHub Check: Test (macos-latest, 22, 2/3)
  • GitHub Check: Test (macos-latest, 22, 3/3)
  • GitHub Check: Test bin (ubuntu-latest, 22, 2/3)
  • GitHub Check: Test bin (ubuntu-latest, 22, 0/3)
  • GitHub Check: Test bin (windows-latest, 22, 2/3)
  • GitHub Check: Test bin (windows-latest, 22, 1/3)
  • GitHub Check: Test bin (windows-latest, 22, 0/3)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Cloudflare Pages: egg-v3
🔇 Additional comments (32)
plugins/view-nunjucks/package.json (1)

43-43: LGTM. The lint script is consistently updated to include --type-check alongside --type-aware.

plugins/watcher/package.json (1)

26-26: LGTM. The lint script is consistently updated to include the --type-check flag.

packages/utils/package.json (1)

28-28: Verify oxlint is available as a dependency. The lint script references oxlint, but it is not declared in this package's devDependencies (lines 46–51). Ensure oxlint is available via the workspace root or inherited configuration.

AGENTS.md (1)

13-13: LGTM. Documentation is properly updated to reflect the new linting command with the --type-check flag. This aligns with the PR objective.

tools/create-egg/src/templates/simple-ts/package.json (1)

19-19: LGTM. The lint script is consistently updated to include the --type-check flag, and oxlint is properly declared in devDependencies.

plugins/tracer/package.json (1)

56-56: Verify oxlint is available as a dependency. The lint script references oxlint, but it is not declared in this package's devDependencies (lines 47–53). Verify that oxlint is inherited from the workspace root or available via another mechanism.

packages/router/package.json (1)

47-47: LGTM. The lint script is consistently updated to include the --type-check flag.

pnpm-workspace.yaml (1)

174-175: Use --type-aware flag, not --type-check. Oxlint 1.31.0 introduced the --type-aware CLI flag for type-aware linting with the tsgolint backend. The version bump to ^1.31.0 is justified as this is the version that enables this feature. Ensure oxlint-tsgolint (^0.8.3) remains installed to support it.

Likely an incorrect or invalid review comment.

plugins/redis/package.json (1)

55-55: Plugin lint script properly updated for type checking.

The change aligns with the repo-wide oxlint type-checking adoption and maintains plugin compatibility requirements.

tools/create-egg/src/templates/tegg/package.json (1)

17-17: Template updated to reflect new linting standard.

Generated tegg projects will now include type checking in linting by default, improving code quality consistency.

packages/koa-static-cache/package.json (1)

52-52: Package lint script correctly configured with type checking.

The change is consistent across the codebase and aligns with project standards.

plugins/jsonp/package.json (1)

70-70: Plugin lint script properly updated.

The change maintains plugin compatibility and follows project conventions.

plugins/i18n/package.json (1)

76-76: Plugin lint script properly configured.

The change is consistent with the repo-wide update and maintains all plugin requirements.

tools/scripts/package.json (1)

62-62: Tool lint script correctly updated.

The change is consistent across the codebase and properly configured.

plugins/onerror/package.json (1)

52-52: Lint script properly updated with type checking.

The addition of --type-check to the oxlint command aligns with the PR's objective to enable type-aware linting across the monorepo.

plugins/view/package.json (1)

74-74: Lint script properly updated with type checking.

The addition of --type-check to the oxlint command is consistent with changes across the monorepo.

plugins/session/package.json (1)

68-69: Lint script properly updated with type checking.

The addition of --type-check enables type-aware linting. The lint:fix script (line 69) correctly chains --fix after the type check, following best practices for linting workflows.

package.json (2)

37-37: Root lint script properly updated with type checking.

The addition of --type-check to the root lint script enables type-aware linting across the monorepo.


74-74: Lint-staged configuration properly updated for precommit type checking.

The addition of --type-check to the lint-staged TypeScript file handler ensures type checking occurs during precommit checks, with --fix correctly placed last to allow autofixing after validation.

Verify that the oxlint version referenced in pnpm-workspace.yaml (mentioned in the PR as bumped to ^1.31.0) supports the --type-check flag and that no incompatibilities exist with the pinned versions of oxlint-tsgolint.

plugins/schedule/package.json (1)

71-72: Lint script properly updated with type checking.

The addition of --type-check enables type-aware linting. The lint:fix script (line 72) correctly chains --fix after the type check.

packages/errors/package.json (1)

37-37: Lint script properly updated with type checking.

The addition of --type-check aligns with the monorepo-wide enablement of type-aware linting.

packages/path-matching/package.json (1)

46-46: Lint script properly updated with type checking.

The addition of --type-check is consistent with the monorepo-wide change to enable type-aware linting.

plugins/development/package.json (1)

61-62: Lint script properly updated with type checking.

The addition of --type-check enables type-aware linting for the development plugin, consistent with the monorepo-wide update.

CLAUDE.md (1)

205-205: Excellent documentation updates for type-check enablement.

The CLAUDE.md file comprehensively documents the oxlint --type-check flag across multiple sections (commands, plugin templates, linting strategy, and migration guide). Documentation is internally consistent and accurately reflects the changes.

Also applies to: 433-433, 472-476, 857-861

plugins/logrotator/package.json (1)

92-92: Plugin lint script properly updated.

The logrotator plugin follows the lint script update pattern consistently with other packages in the monorepo.

packages/cookies/package.json (1)

40-40: Lint script update applied correctly to cookies package.

The change aligns with repository-wide oxlint type-check enablement. The lint:fix variant is also present for auto-fixing capability.

plugins/security/package.json (1)

143-143: Security plugin lint script updated consistently.

The type-check flag is added following the same pattern as other packages. Lint:fix and test scripts properly chain the linting.

packages/supertest/package.json (1)

61-61: Supertest package lint script updated.

Change applied consistently with repository-wide pattern. All required package scripts present.

plugins/multipart/package.json (1)

82-82: Multipart plugin lint script updated.

The type-check flag is added consistently. Lint:fix chaining in test script follows proper pattern.

plugins/static/package.json (1)

60-60: Static plugin lint script updated.

The change follows the established pattern. All required scripts and dependencies are properly configured.

packages/koa/package.json (1)

29-29: Lint script update is correct.

The --type-check flag is a valid and documented oxlint option (experimental type checking with TypeScript compiler diagnostics). Combined with --type-aware, this provides comprehensive type-aware linting and type checking. Package structure includes all required scripts (build, typecheck, lint, test, prepublishOnly) and follows guidelines.

plugins/typebox-validate/package.json (1)

55-61: Package.json follows all standards and coding guidelines.

The file correctly includes all required scripts (build, typecheck, lint, test, prepublishOnly), sets type: module, configures peerDependencies with egg, and properly structures publishConfig.exports. Uses of workspace:* and catalog: follow best practices. Based on coding guidelines, this structure is correct.

"build": "tsdown && rimraf dist *.tsbuildinfo && tsc -p tsconfig.build.json",
"typecheck": "tsc --noEmit",
"lint": "oxlint --type-aware",
"lint": "oxlint --type-aware --type-check",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

oxlint 1.31.0 --type-check flag documentation

💡 Result:

There is no documented --type-check flag for oxlint v1.31.0 (or current oxlint CLI). Oxlint’s type-aware/type-checking preview is enabled with the --type-aware flag and requires the oxlint-tsgolint package; see the official docs and blog announcement. [1][2][3]

References:

  • Oxlint Linter docs (usage / type-aware): oxc.rs/docs/guide/usage/linter. [1]
  • Oxlint Type-Aware guide / preview (shows --type-aware usage and oxlint-tsgolint requirement). [2]
  • Oxlint Type-Aware announcement (blog). [3]

Remove the invalid --type-check flag from the lint script.

The --type-check flag does not exist in oxlint v1.31.0. Oxlint's type-aware functionality is enabled only with the --type-aware flag (already present on this line). The additional --type-check flag will cause the lint script to fail with an unrecognized option error. Remove it and keep only "oxlint --type-aware".

🤖 Prompt for AI Agents
In plugins/typebox-validate/package.json around line 58, the lint script
includes an invalid flag `--type-check` which causes oxlint to error; remove the
`--type-check` flag and leave the script as `"oxlint --type-aware"` so only the
supported type-aware option remains.

},
"scripts": {
"lint": "oxlint --type-aware",
"lint": "oxlint --type-aware --type-check",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

oxlint version 1.31.0 --type-check flag support documentation

💡 Result:

Short answer: oxlint does not document a --type-check flag in its CLI. Type-aware/type-check–style linting is provided via the --type-aware flag (with the oxlint-tsgolint backend) — see the CLI and Type-Aware Linting docs and the tsgolint repo for details. [1][2][3]

Sources:

  • oxlint CLI docs (flags including --tsconfig and the type-aware guidance). [1]
  • Oxlint Type-Aware Linting guide (usage: install oxlint-tsgolint and run oxlint --type-aware). [2]
  • tsgolint GitHub (backend used by oxlint for type-aware/type-check rules). [3]

Remove the unsupported --type-check flag from the lint script.

Oxlint does not support a --type-check flag. Type-aware linting is provided exclusively through the --type-aware flag (with the oxlint-tsgolint backend). The lint script should be "oxlint --type-aware" to avoid CLI errors.

🤖 Prompt for AI Agents
In tools/egg-bin/package.json at line 67, the npm "lint" script includes an
unsupported "--type-check" flag which causes CLI errors; remove the
"--type-check" token so the script uses only the supported "--type-aware" option
(i.e., update the lint script entry to call oxlint with --type-aware and no
--type-check).

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enables enhanced type checking in oxlint by adding the --type-check flag alongside the existing --type-aware flag, and upgrades oxlint from v1.25.0 to v1.31.0 (which requires oxlint-tsgolint >=0.8.1, updated here to 0.8.3).

Key Changes:

  • Adds --type-check flag to all oxlint invocations across the monorepo
  • Updates oxlint from ^1.25.0 to ^1.31.0 in pnpm catalog
  • Updates oxlint-tsgolint from ^0.8.0 to ^0.8.3 to meet new peer dependency requirements
  • Updates documentation (CLAUDE.md and AGENTS.md) to reflect the new linting command

Reviewed changes

Copilot reviewed 33 out of 34 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pnpm-workspace.yaml Updates oxlint catalog version to ^1.31.0 and oxlint-tsgolint to ^0.8.3
pnpm-lock.yaml Reflects the dependency version updates with new package resolutions and integrity hashes
package.json Adds --type-check flag to root lint script and lint-staged configuration
tools/scripts/package.json Adds --type-check to lint script
tools/egg-bin/package.json Adds --type-check to lint script
tools/create-egg/src/templates/tegg/package.json Updates project template with --type-check flag
tools/create-egg/src/templates/simple-ts/package.json Updates project template with --type-check flag
tools/create-egg/src/templates/egg3-tegg/package.json Updates project template with --type-check flag
plugins/watcher/package.json Adds --type-check to lint script
plugins/view/package.json Adds --type-check to lint script
plugins/view-nunjucks/package.json Adds --type-check to lint script
plugins/typebox-validate/package.json Adds --type-check to lint script
plugins/tracer/package.json Adds --type-check to lint script
plugins/static/package.json Adds --type-check to lint script
plugins/session/package.json Adds --type-check to lint script
plugins/security/package.json Adds --type-check to lint script
plugins/schedule/package.json Adds --type-check to lint script
plugins/redis/package.json Adds --type-check to lint script
plugins/onerror/package.json Adds --type-check to lint script
plugins/multipart/package.json Adds --type-check to lint script
plugins/logrotator/package.json Adds --type-check to lint script
plugins/jsonp/package.json Adds --type-check to lint script
plugins/i18n/package.json Adds --type-check to lint script
plugins/development/package.json Adds --type-check to lint script
packages/utils/package.json Adds --type-check to lint script
packages/supertest/package.json Adds --type-check to lint script
packages/router/package.json Adds --type-check to lint script
packages/path-matching/package.json Adds --type-check to lint script
packages/koa/package.json Adds --type-check to lint script
packages/koa-static-cache/package.json Adds --type-check to lint script
packages/errors/package.json Adds --type-check to lint script
packages/cookies/package.json Adds --type-check to lint script
CLAUDE.md Updates all references to oxlint command to include --type-check flag
AGENTS.md Updates coding style section to reflect new oxlint command
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment on lines +174 to +175
oxlint: ^1.31.0
oxlint-tsgolint: ^0.8.3
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

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

Several core packages in the monorepo were not updated to use the new --type-check flag. The following packages still use "lint": "oxlint" without the updated flags:

  • packages/egg/package.json (line 200)
  • packages/core/package.json (line 28)
  • packages/cluster/package.json (line 26)
  • packages/extend2/package.json (line 19)
  • packages/tsconfig/package.json (line 14)
  • examples/helloworld-commonjs/package.json (line 19)

For consistency with the rest of the monorepo changes and to enable the enhanced type checking capabilities in oxlint v1.31.0, these packages should also be updated to use "lint": "oxlint --type-aware --type-check".

Copilot uses AI. Check for mistakes.
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 enables the --type-check flag for oxlint across the entire monorepo, which is a great improvement for strengthening the linting process with TypeScript's type-checking rules. The changes are consistently applied to all relevant package.json files, documentation, and configuration files. The oxlint dependency has also been updated to a newer version to support this feature. The changes are well-executed and improve the overall code quality and consistency of the project. I have a couple of minor suggestions to improve the wording in the documentation for clarity.

- `pnpm -r run clean` - Clean dist directories in all packages
- `pnpm -r run typecheck` - Run TypeScript type checking with `tsc --noEmit`
- `pnpm lint` - Run oxlint with type-aware checking in all packages
- `pnpm lint` - Run oxlint with type-aware and type-check checking in all packages
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The description is a bit redundant. oxlint --type-check implies type awareness. For conciseness, you could simplify this.

Suggested change
- `pnpm lint` - Run oxlint with type-aware and type-check checking in all packages
- `pnpm lint` - Run oxlint with type checking in all packages

- Uses `--type-aware` flag for enhanced TypeScript analysis
- **Prettier** - Code formatting (primarily for documentation)
- Run `pnpm lint` to check code quality with oxlint
- Run `pnpm lint` to check code quality with oxlint type-aware and type-check
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The phrasing here is a bit awkward. For better readability, you could rephrase it.

Suggested change
- Run `pnpm lint` to check code quality with oxlint type-aware and type-check
- Run `pnpm lint` to check code quality with oxlint's type checking

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