-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore: enable oxlint type check #5712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit 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. WalkthroughUpdated 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (12)📓 Common learnings📚 Learning: 2025-11-27T14:38:37.671ZApplied to files:
📚 Learning: 2025-11-27T14:38:37.671ZApplied to files:
📚 Learning: 2025-11-27T14:38:37.671ZApplied to files:
📚 Learning: 2025-11-27T14:38:37.671ZApplied to files:
📚 Learning: 2025-11-27T14:38:37.671ZApplied to files:
📚 Learning: 2025-11-27T14:38:55.513ZApplied to files:
📚 Learning: 2025-11-27T14:38:37.671ZApplied to files:
📚 Learning: 2025-11-27T14:38:37.671ZApplied to files:
📚 Learning: 2025-11-27T14:38:37.671ZApplied to files:
📚 Learning: 2025-11-27T14:38:55.513ZApplied to files:
📚 Learning: 2025-11-27T14:38:37.671ZApplied to files:
⏰ 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)
🔇 Additional comments (1)
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. Comment |
Deploying egg with
|
| 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 |
Summary of ChangesHello @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 Highlights
Using Gemini Code AssistThe 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
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 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
|
Deploying egg-v3 with
|
| 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis 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
ConfigurepublishConfig.exportsin plugin package.json to overrideexportsduring npm publish
Files:
plugins/redis/package.jsonplugins/watcher/package.jsonplugins/schedule/package.jsonplugins/multipart/package.jsonplugins/jsonp/package.jsonplugins/session/package.jsonplugins/onerror/package.jsonplugins/view-nunjucks/package.jsonplugins/development/package.jsonplugins/logrotator/package.jsonplugins/static/package.jsonplugins/security/package.jsonplugins/view/package.jsonplugins/i18n/package.jsonplugins/tracer/package.jsonplugins/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
Settype: modulein package.json for ESM packages
Includebuild,typecheck,lint,test, andprepublishOnlyscripts in all package.json files
Files:
plugins/redis/package.jsonplugins/watcher/package.jsonplugins/schedule/package.jsonpackages/cookies/package.jsonplugins/multipart/package.jsonplugins/jsonp/package.jsonplugins/session/package.jsonplugins/onerror/package.jsonplugins/view-nunjucks/package.jsonpackages/supertest/package.jsonplugins/development/package.jsontools/egg-bin/package.jsonplugins/logrotator/package.jsonpackages/path-matching/package.jsonpackages/router/package.jsonplugins/static/package.jsonplugins/security/package.jsonplugins/view/package.jsonpackages/koa-static-cache/package.jsonplugins/i18n/package.jsonplugins/tracer/package.jsonplugins/typebox-validate/package.jsontools/scripts/package.jsonpackages/utils/package.jsonpackages/koa/package.jsonpackages/errors/package.json
package.json
📄 CodeRabbit inference engine (AGENTS.md)
Keep local Node.js and pnpm versions aligned with the repo's
packageManagerfield 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.jsonplugins/watcher/package.jsonplugins/schedule/package.jsontools/create-egg/src/templates/egg3-tegg/package.jsonpackages/cookies/package.jsonplugins/multipart/package.jsonpackage.jsonplugins/jsonp/package.jsonplugins/session/package.jsontools/create-egg/src/templates/tegg/package.jsonCLAUDE.mdplugins/onerror/package.jsonplugins/view-nunjucks/package.jsonpackages/supertest/package.jsonpnpm-workspace.yamlplugins/development/package.jsontools/egg-bin/package.jsonplugins/logrotator/package.jsonpackages/path-matching/package.jsonpackages/router/package.jsonplugins/static/package.jsonplugins/security/package.jsonplugins/view/package.jsonpackages/koa-static-cache/package.jsonplugins/i18n/package.jsonplugins/tracer/package.jsonplugins/typebox-validate/package.jsontools/scripts/package.jsonpackages/utils/package.jsonpackages/koa/package.jsontools/create-egg/src/templates/simple-ts/package.jsonpackages/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.jsonplugins/watcher/package.jsonplugins/schedule/package.jsontools/create-egg/src/templates/egg3-tegg/package.jsonpackages/cookies/package.jsonplugins/multipart/package.jsonpackage.jsonplugins/jsonp/package.jsonplugins/session/package.jsontools/create-egg/src/templates/tegg/package.jsonCLAUDE.mdplugins/onerror/package.jsonplugins/view-nunjucks/package.jsonpackages/supertest/package.jsonplugins/development/package.jsontools/egg-bin/package.jsonplugins/logrotator/package.jsonpackages/path-matching/package.jsonpackages/router/package.jsonplugins/static/package.jsonplugins/security/package.jsonplugins/view/package.jsonpackages/koa-static-cache/package.jsonplugins/i18n/package.jsonplugins/tracer/package.jsonplugins/typebox-validate/package.jsontools/scripts/package.jsonpackages/utils/package.jsonpackages/koa/package.jsontools/create-egg/src/templates/simple-ts/package.jsonpackages/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.jsonplugins/watcher/package.jsonplugins/schedule/package.jsontools/create-egg/src/templates/egg3-tegg/package.jsonpackages/cookies/package.jsonplugins/multipart/package.jsonpackage.jsonplugins/jsonp/package.jsonplugins/session/package.jsontools/create-egg/src/templates/tegg/package.jsonCLAUDE.mdplugins/onerror/package.jsonplugins/view-nunjucks/package.jsonpackages/supertest/package.jsonplugins/development/package.jsontools/egg-bin/package.jsonplugins/logrotator/package.jsonpackages/path-matching/package.jsonpackages/router/package.jsonplugins/static/package.jsonplugins/security/package.jsonplugins/view/package.jsonpackages/koa-static-cache/package.jsonplugins/i18n/package.jsonplugins/tracer/package.jsonplugins/typebox-validate/package.jsontools/scripts/package.jsonpackages/utils/package.jsonpackages/koa/package.jsontools/create-egg/src/templates/simple-ts/package.jsonpackages/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.jsonplugins/watcher/package.jsonplugins/schedule/package.jsontools/create-egg/src/templates/egg3-tegg/package.jsonpackages/cookies/package.jsonplugins/multipart/package.jsonpackage.jsonplugins/jsonp/package.jsonplugins/session/package.jsontools/create-egg/src/templates/tegg/package.jsonCLAUDE.mdplugins/onerror/package.jsonplugins/view-nunjucks/package.jsonpackages/supertest/package.jsonplugins/development/package.jsontools/egg-bin/package.jsonplugins/logrotator/package.jsonpackages/path-matching/package.jsonpackages/router/package.jsonplugins/static/package.jsonplugins/security/package.jsonplugins/view/package.jsonpackages/koa-static-cache/package.jsonplugins/i18n/package.jsonplugins/tracer/package.jsonplugins/typebox-validate/package.jsontools/scripts/package.jsonpackages/utils/package.jsonpackages/koa/package.jsontools/create-egg/src/templates/simple-ts/package.jsonpackages/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.jsonplugins/schedule/package.jsontools/create-egg/src/templates/egg3-tegg/package.jsonpackages/cookies/package.jsonplugins/multipart/package.jsonpackage.jsonplugins/jsonp/package.jsonplugins/session/package.jsontools/create-egg/src/templates/tegg/package.jsonCLAUDE.mdplugins/onerror/package.jsonplugins/view-nunjucks/package.jsonpackages/supertest/package.jsonplugins/development/package.jsontools/egg-bin/package.jsonplugins/logrotator/package.jsonpackages/path-matching/package.jsonpackages/router/package.jsonplugins/static/package.jsonplugins/security/package.jsonplugins/view/package.jsonpackages/koa-static-cache/package.jsonplugins/i18n/package.jsonplugins/tracer/package.jsonplugins/typebox-validate/package.jsontools/scripts/package.jsonpackages/utils/package.jsonpackages/koa/package.jsontools/create-egg/src/templates/simple-ts/package.jsonpackages/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.jsonplugins/schedule/package.jsontools/create-egg/src/templates/egg3-tegg/package.jsonpackages/cookies/package.jsonplugins/multipart/package.jsonAGENTS.mdpackage.jsonplugins/jsonp/package.jsonplugins/session/package.jsontools/create-egg/src/templates/tegg/package.jsonCLAUDE.mdplugins/onerror/package.jsonplugins/view-nunjucks/package.jsonpackages/supertest/package.jsonplugins/development/package.jsontools/egg-bin/package.jsonplugins/logrotator/package.jsonpackages/path-matching/package.jsonplugins/static/package.jsonplugins/security/package.jsonpackages/koa-static-cache/package.jsonplugins/i18n/package.jsonplugins/typebox-validate/package.jsontools/scripts/package.jsonpackages/utils/package.jsonpackages/koa/package.jsontools/create-egg/src/templates/simple-ts/package.jsonpackages/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.jsonplugins/watcher/package.jsonplugins/schedule/package.jsonpackages/cookies/package.jsonplugins/multipart/package.jsonAGENTS.mdplugins/jsonp/package.jsonplugins/session/package.jsonCLAUDE.mdplugins/view-nunjucks/package.jsonpackages/supertest/package.jsonplugins/logrotator/package.jsonpackages/path-matching/package.jsonplugins/static/package.jsonplugins/security/package.jsonpackages/koa-static-cache/package.jsonplugins/i18n/package.jsonplugins/typebox-validate/package.jsontools/scripts/package.jsonpackages/koa/package.jsonpackages/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.jsonplugins/schedule/package.jsontools/create-egg/src/templates/egg3-tegg/package.jsonpackages/cookies/package.jsonplugins/multipart/package.jsonpackage.jsonplugins/jsonp/package.jsonplugins/session/package.jsontools/create-egg/src/templates/tegg/package.jsonCLAUDE.mdplugins/view-nunjucks/package.jsonpackages/supertest/package.jsontools/egg-bin/package.jsonplugins/logrotator/package.jsonpackages/path-matching/package.jsonplugins/static/package.jsonplugins/security/package.jsonpackages/koa-static-cache/package.jsonplugins/i18n/package.jsonplugins/typebox-validate/package.jsontools/scripts/package.jsonpackages/koa/package.jsontools/create-egg/src/templates/simple-ts/package.jsonpackages/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.jsonplugins/multipart/package.jsonAGENTS.mdplugins/jsonp/package.jsonplugins/session/package.jsonCLAUDE.mdplugins/view-nunjucks/package.jsonpackages/supertest/package.jsonplugins/logrotator/package.jsonpackages/path-matching/package.jsonplugins/security/package.jsonplugins/i18n/package.jsonplugins/typebox-validate/package.jsontools/scripts/package.jsonpackages/koa/package.jsonpackages/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.jsonplugins/watcher/package.jsonplugins/schedule/package.jsontools/create-egg/src/templates/egg3-tegg/package.jsonpackages/cookies/package.jsonplugins/multipart/package.jsonplugins/jsonp/package.jsonplugins/session/package.jsontools/create-egg/src/templates/tegg/package.jsonCLAUDE.mdplugins/onerror/package.jsonplugins/view-nunjucks/package.jsonpackages/supertest/package.jsonplugins/development/package.jsontools/egg-bin/package.jsonplugins/logrotator/package.jsonpackages/path-matching/package.jsonpackages/router/package.jsonplugins/static/package.jsonplugins/security/package.jsonplugins/view/package.jsonpackages/koa-static-cache/package.jsonplugins/i18n/package.jsonplugins/tracer/package.jsonplugins/typebox-validate/package.jsontools/scripts/package.jsonpackages/utils/package.jsonpackages/koa/package.jsontools/create-egg/src/templates/simple-ts/package.jsonpackages/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.jsonplugins/multipart/package.jsontools/egg-bin/package.jsonplugins/static/package.jsonplugins/security/package.jsonplugins/typebox-validate/package.jsontools/scripts/package.jsonpackages/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.jsonAGENTS.mdCLAUDE.mdpackages/utils/package.jsontools/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.jsontools/create-egg/src/templates/egg3-tegg/package.jsontools/create-egg/src/templates/tegg/package.jsonCLAUDE.mdtools/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.jsontools/create-egg/src/templates/egg3-tegg/package.jsontools/create-egg/src/templates/tegg/package.jsonCLAUDE.mdtools/egg-bin/package.jsontools/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.jsonCLAUDE.mdpackages/supertest/package.jsontools/egg-bin/package.jsonpackages/utils/package.jsontools/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.jsonpackages/cookies/package.jsonpackage.jsonCLAUDE.mdplugins/onerror/package.jsonpackages/supertest/package.jsonplugins/development/package.jsonpackages/router/package.jsonplugins/static/package.jsonplugins/view/package.jsonpackages/koa-static-cache/package.jsonplugins/tracer/package.jsontools/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.jsonplugins/multipart/package.jsonpackage.jsonplugins/jsonp/package.jsonplugins/session/package.jsontools/create-egg/src/templates/tegg/package.jsonCLAUDE.mdplugins/onerror/package.jsonpackages/supertest/package.jsonpnpm-workspace.yamlplugins/development/package.jsontools/egg-bin/package.jsonplugins/logrotator/package.jsonpackages/path-matching/package.jsonpackages/router/package.jsonplugins/static/package.jsonplugins/security/package.jsonplugins/view/package.jsonplugins/i18n/package.jsontools/scripts/package.jsonpackages/utils/package.jsonpackages/koa/package.jsontools/create-egg/src/templates/simple-ts/package.jsonpackages/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.jsonpackage.jsontools/create-egg/src/templates/tegg/package.jsontools/egg-bin/package.jsonplugins/security/package.jsontools/scripts/package.jsonpackages/utils/package.jsontools/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.jsontools/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.jsontools/create-egg/src/templates/tegg/package.jsonpackages/utils/package.jsontools/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.jsontools/create-egg/src/templates/tegg/package.jsonpnpm-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.jsonCLAUDE.mdpackages/supertest/package.jsontools/egg-bin/package.jsonpackages/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.mdpackage.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.mdpackage.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.mdpackage.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.jsonCLAUDE.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.jsonCLAUDE.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.jsonCLAUDE.mdplugins/security/package.jsonplugins/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.mdpnpm-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.mdplugins/onerror/package.jsonplugins/development/package.jsonpackages/router/package.jsonplugins/view/package.jsonplugins/tracer/package.jsontools/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.mdpackages/router/package.jsonplugins/view/package.jsonplugins/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.jsonpackages/router/package.jsonplugins/view/package.jsonplugins/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-checkalongside--type-aware.plugins/watcher/package.json (1)
26-26: LGTM. The lint script is consistently updated to include the--type-checkflag.packages/utils/package.json (1)
28-28: Verify oxlint is available as a dependency. The lint script referencesoxlint, but it is not declared in this package'sdevDependencies(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-checkflag. 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-checkflag, and oxlint is properly declared in devDependencies.plugins/tracer/package.json (1)
56-56: Verify oxlint is available as a dependency. The lint script referencesoxlint, but it is not declared in this package'sdevDependencies(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-checkflag.pnpm-workspace.yaml (1)
174-175: Use--type-awareflag, not--type-check. Oxlint 1.31.0 introduced the--type-awareCLI flag for type-aware linting with the tsgolint backend. The version bump to^1.31.0is 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-checkto 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-checkto 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-checkenables type-aware linting. Thelint:fixscript (line 69) correctly chains--fixafter 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-checkto 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-checkto the lint-staged TypeScript file handler ensures type checking occurs during precommit checks, with--fixcorrectly 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-checkflag 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-checkenables type-aware linting. Thelint:fixscript (line 72) correctly chains--fixafter the type check.packages/errors/package.json (1)
37-37: Lint script properly updated with type checking.The addition of
--type-checkaligns 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-checkis 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-checkenables 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-checkflag 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-checkflag 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), setstype: module, configurespeerDependencieswith egg, and properly structurespublishConfig.exports. Uses ofworkspace:*andcatalog: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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 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).
There was a problem hiding this 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-checkflag 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
| oxlint: ^1.31.0 | ||
| oxlint-tsgolint: ^0.8.3 |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
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".
There was a problem hiding this 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.