chore: enable oxlint type check
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 (including publish/build hooks).
-
Style / Config
- Adjusted lint configuration to ignore additional template paths.
-
Documentation
- Minor doc updates to reflect the updated lint behavior.
βοΈ Tip: You can customize this high-level summary in your review settings.
[!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
Added the --type-check flag to oxlint invocations across docs, root and package scripts, templates and tools; bumped pnpm-workspace catalog entries for oxlint, oxlint-tsgolint, and @types/node; added a prepublishOnly script to the simple-ts template; expanded .oxlintrc.json ignorePatterns.
Changes
| Cohort / File(s) | Summary |
|---|---|
Documentation AGENTS.md, CLAUDE.md |
Updated lint examples and guidance from oxlint --type-aware to oxlint --type-aware --type-check. |
Root config & scripts package.json, pnpm-workspace.yaml |
Root lint and lint-staged TS handler now use oxlint --type-aware --type-check; bumped catalog versions in pnpm-workspace.yaml for @types/node β ^24.10.2, oxlint β ^1.32.0, oxlint-tsgolint β ^0.8.4. |
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`` |
Each package scripts.lint changed 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`` |
Each plugin scripts.lint changed 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 tools and templates to include --type-check; tools/create-egg/src/templates/simple-ts/package.json also added prepublishOnly: "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
- Spot-check a few representative package/plugin manifests to confirm consistent
--type-checkusage and no typos. - Verify pnpm-workspace.yaml version bumps target the intended catalog entries.
- Review the new
prepublishOnlyscript intools/create-egg/src/templates/simple-ts/package.json.
Possibly related issues
- eggjs/egg#5439 β also adjusts oxlint usage/versioning across scripts and workspace catalog; likely related to the same lint tooling changes.
Possibly related PRs
- eggjs/egg#5567 β modifies create-egg template scripts (templates overlap with this PR's template updates).
- eggjs/egg#5671 β bumps pnpm-workspace oxlint/oxlint-tsgolint entries (matches the workspace version changes here).
- eggjs/egg#5543 β earlier oxlint migration for packages like
packages/cookies; this PR updates those lint invocations to include--type-check.
Poem
π° I hopped through package.json and tree,
Tucked type-check flags where linters be,
From templates up to workspace vine,
Now CI peeks at types just fine,
A tiny hop, a tidy sign. π₯
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 across all modified files, which consistently add the --type-check flag to oxlint commands throughout the repository. |
| 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 e0f08ff6bc65fbb2b881fd9aeff17ac8d88c4780 and 6b2fbd56abcc52e9d3fac575aa71e316fa0431a4.
β Files ignored due to path filters (1)
-
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
π Files selected for processing (34)
-
.oxlintrc.json(1 hunks) -
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(2 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)
π§ Files skipped from review as they are similar to previous changes (22)
- plugins/tracer/package.json
- packages/supertest/package.json
- packages/koa-static-cache/package.json
- plugins/static/package.json
- packages/cookies/package.json
- tools/scripts/package.json
- plugins/logrotator/package.json
- plugins/redis/package.json
- tools/create-egg/src/templates/tegg/package.json
- plugins/view-nunjucks/package.json
- packages/utils/package.json
- .oxlintrc.json
- package.json
- plugins/i18n/package.json
- CLAUDE.md
- plugins/development/package.json
- plugins/view/package.json
- packages/koa/package.json
- pnpm-workspace.yaml
- tools/egg-bin/package.json
- AGENTS.md
- plugins/onerror/package.json
π§° Additional context used
π Path-based instructions (2)
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/typebox-validate/package.json -
plugins/multipart/package.json -
plugins/jsonp/package.json -
plugins/security/package.json -
plugins/watcher/package.json -
plugins/session/package.json -
plugins/schedule/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/typebox-validate/package.json -
packages/router/package.json -
plugins/multipart/package.json -
plugins/jsonp/package.json -
plugins/security/package.json -
plugins/watcher/package.json -
packages/path-matching/package.json -
packages/errors/package.json -
plugins/session/package.json -
plugins/schedule/package.json
π§ Learnings (25)
π 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: 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: 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: 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 {.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 {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 tools/egg-bin/tsconfig.json : Set `isolatedDeclarations: false` in tsconfig.json for oclif CLI tools (tools/egg-bin) due to Flags API incompatibility
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} : Set `type: module` in package.json for ESM packages
π 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:
-
tools/create-egg/src/templates/egg3-tegg/package.json -
plugins/typebox-validate/package.json -
packages/router/package.json -
plugins/multipart/package.json -
plugins/jsonp/package.json -
plugins/security/package.json -
plugins/watcher/package.json -
tools/create-egg/src/templates/simple-ts/package.json -
packages/path-matching/package.json -
packages/errors/package.json -
plugins/session/package.json -
plugins/schedule/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 oxlint with `--type-aware` flag for linting across all packages instead of ESLint
Applied to files:
-
tools/create-egg/src/templates/egg3-tegg/package.json -
plugins/typebox-validate/package.json -
packages/router/package.json -
plugins/multipart/package.json -
plugins/jsonp/package.json -
plugins/security/package.json -
plugins/watcher/package.json -
tools/create-egg/src/templates/simple-ts/package.json -
packages/path-matching/package.json -
packages/errors/package.json -
plugins/session/package.json -
plugins/schedule/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:
-
tools/create-egg/src/templates/egg3-tegg/package.json -
plugins/watcher/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/typebox-validate/package.json -
packages/router/package.json -
packages/path-matching/package.json -
packages/errors/package.json -
plugins/session/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:
-
tools/create-egg/src/templates/egg3-tegg/package.json -
plugins/typebox-validate/package.json -
packages/router/package.json -
plugins/multipart/package.json -
plugins/jsonp/package.json -
plugins/security/package.json -
plugins/watcher/package.json -
tools/create-egg/src/templates/simple-ts/package.json -
packages/path-matching/package.json -
packages/errors/package.json -
plugins/session/package.json -
plugins/schedule/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
π 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:
-
tools/create-egg/src/templates/egg3-tegg/package.json -
plugins/watcher/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 {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:
-
tools/create-egg/src/templates/egg3-tegg/package.json -
plugins/typebox-validate/package.json -
packages/router/package.json -
plugins/multipart/package.json -
plugins/jsonp/package.json -
plugins/security/package.json -
plugins/watcher/package.json -
tools/create-egg/src/templates/simple-ts/package.json -
packages/path-matching/package.json -
packages/errors/package.json -
plugins/session/package.json -
plugins/schedule/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:
-
tools/create-egg/src/templates/egg3-tegg/package.json -
plugins/typebox-validate/package.json -
packages/router/package.json -
plugins/multipart/package.json -
plugins/jsonp/package.json -
plugins/security/package.json -
tools/create-egg/src/templates/simple-ts/package.json -
packages/path-matching/package.json -
packages/errors/package.json -
plugins/session/package.json -
plugins/schedule/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:
-
tools/create-egg/src/templates/egg3-tegg/package.json -
plugins/typebox-validate/package.json -
packages/router/package.json -
plugins/multipart/package.json -
plugins/jsonp/package.json -
plugins/security/package.json -
tools/create-egg/src/templates/simple-ts/package.json -
packages/path-matching/package.json -
packages/errors/package.json -
plugins/session/package.json -
plugins/schedule/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:
-
tools/create-egg/src/templates/egg3-tegg/package.json -
plugins/typebox-validate/package.json -
plugins/multipart/package.json -
plugins/jsonp/package.json -
plugins/security/package.json -
tools/create-egg/src/templates/simple-ts/package.json -
packages/path-matching/package.json -
packages/errors/package.json -
plugins/session/package.json -
plugins/schedule/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:
-
tools/create-egg/src/templates/egg3-tegg/package.json -
plugins/typebox-validate/package.json -
packages/router/package.json -
plugins/multipart/package.json -
plugins/jsonp/package.json -
plugins/security/package.json -
tools/create-egg/src/templates/simple-ts/package.json -
packages/path-matching/package.json -
packages/errors/package.json -
plugins/session/package.json -
plugins/schedule/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/typebox-validate/package.json -
plugins/security/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:
-
plugins/typebox-validate/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/*/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/typebox-validate/package.json -
plugins/multipart/package.json -
plugins/jsonp/package.json -
plugins/security/package.json -
plugins/watcher/package.json -
packages/path-matching/package.json -
packages/errors/package.json -
plugins/session/package.json -
plugins/schedule/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/typebox-validate/package.json -
plugins/multipart/package.json -
plugins/jsonp/package.json -
plugins/security/package.json -
packages/path-matching/package.json -
packages/errors/package.json -
plugins/session/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:
-
packages/router/package.json -
tools/create-egg/src/templates/simple-ts/package.json -
plugins/schedule/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 Vitest as the standard test runner for all packages; test files follow pattern 'test/**/*.test.ts'
Applied to files:
-
packages/router/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 **/*.test.ts : Import test functions from vitest using `import { describe, it } from 'vitest'` in Vitest test files
Applied to files:
-
packages/router/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 -
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: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: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 -
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/core/*/tsconfig.json : Include tsconfig.json extending eggjs/tsconfig in each core package
Applied to files:
-
tools/create-egg/src/templates/simple-ts/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). (19)
- GitHub Check: Agent
- GitHub Check: Test (ubuntu-latest, 24, 3/3)
- GitHub Check: Test (macos-latest, 24, 2/3)
- GitHub Check: Test (windows-latest, 22, 1/3)
- GitHub Check: Test (windows-latest, 24, 2/3)
- GitHub Check: Test (macos-latest, 24, 1/3)
- GitHub Check: Test (ubuntu-latest, 22, 2/3)
- GitHub Check: Test (ubuntu-latest, 24, 2/3)
- GitHub Check: Test (windows-latest, 24, 3/3)
- GitHub Check: Test (macos-latest, 22, 3/3)
- GitHub Check: Test (ubuntu-latest, 22, 3/3)
- GitHub Check: Test bin (windows-latest, 22, 2/3)
- GitHub Check: Test bin (windows-latest, 22, 1/3)
- GitHub Check: Test bin (ubuntu-latest, 22, 2/3)
- GitHub Check: Test bin (windows-latest, 22, 0/3)
- GitHub Check: Test bin (ubuntu-latest, 22, 1/3)
- GitHub Check: Test bin (ubuntu-latest, 22, 0/3)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Cloudflare Pages: egg-v3
π Additional comments (13)
packages/path-matching/package.json (1)
46-46: Lint script correctly updated with --type-check flag.The change to add
--type-checkto the oxlint command aligns with the PR objective and is consistent with the broader migration across the codebase. The file maintains all required scripts (build,typecheck,lint,test,prepublishOnly) and follows dependency patterns correctly.packages/errors/package.json (1)
37-37: Lint script correctly updated with--type-checkflag.The addition of
--type-checkto the oxlint command aligns with the PR objectives and enables type-aware linting across this package. The file structure is well-organized, all required scripts (build,typecheck,lint,test,prepublishOnly) are present, and dependencies are properly configured usingworkspace:*for internal packages andcatalog:for external dependencies.plugins/watcher/package.json (1)
26-26: Approve lint script update for type-check support.The change to add
--type-checkis correct for oxlint 1.32.0+ and aligns with the PR objective. Oxlint's CLI now includes the--type-checkflag which enables experimental type checking including TypeScript compiler diagnostics.Verify that
oxlint-tsgolintis installed at the workspace level, as type-aware linting requires both the--type-awareflag and theoxlint-tsgolintpackage.plugins/session/package.json (1)
68-68: Approve lint script update.The addition of
--type-checkflag is correct and aligns with oxlint 1.32.0+ capabilities.plugins/typebox-validate/package.json (1)
58-58: The--type-checkflag is valid in oxlint 1.32.0+.The past review comment flagging this as an invalid flag is now outdated. The official oxlint CLI documentation confirms
--type-checkis a supported flag that enables experimental type checking with TypeScript compiler diagnostics.However, since you're using both
--type-awareand--type-checkfor type-aware rules, ensure thatoxlint-tsgolintpackage is installed. This file listsoxlintbut notoxlint-tsgolintin devDependencies.plugins/jsonp/package.json (1)
70-70: Approve lint script update.The
--type-checkflag is valid in oxlint 1.32.0+ and correctly used here.packages/router/package.json (1)
47-47: Approve lint script update.The
--type-checkflag is valid and properly used alongside--type-aware.plugins/schedule/package.json (1)
71-71: Approve lint script update.The
--type-checkflag is valid in oxlint 1.32.0+.tools/create-egg/src/templates/egg3-tegg/package.json (1)
17-17: Approve lint script update with good dependency setup.This template correctly includes both
oxlint(line 40) andoxlint-tsgolint(line 41) in devDependencies, which is the proper setup for type-aware linting with--type-awareand--type-checkflags.plugins/multipart/package.json (1)
82-82: Approve lint script update.The
--type-checkflag is valid in oxlint 1.32.0+.plugins/security/package.json (1)
143-143: Lint script update enables integrated type checking.The
--type-checkflag enables experimental type checking which includes TypeScript compiler diagnostics, reducing the need for a separate type-check command in some cases. The change aligns with the PR's objective to enable oxlint type-check across packages and requires the already-presentoxlint-tsgolintdevDependency.tools/create-egg/src/templates/simple-ts/package.json (2)
19-19: Lint script updated with type-check flag.Consistent with file 1, the
--type-checkflag addition aligns with the PR's objective and supports the same benefits: integrated TypeScript compiler diagnostics during linting.
23-23: Addition ofprepublishOnlyscript aligns with coding guidelines.The newly added
prepublishOnlyscript brings the template into compliance with the coding guideline requirement to includebuild,typecheck,lint,test, andprepublishOnlyscripts. The script appropriately runs the TypeScript build prior to publication.
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 @coderabbitai help to get the list of available commands and usage tips.
Deploying egg with Β
Β Cloudflare Pages
| Latest commit: |
6b2fbd5
|
| Status: | Β β Β Deploy successful! |
| Preview URL: | https://138ef642.egg-cci.pages.dev |
| Branch Preview URL: | https://enable-oxlint-type-check.egg-cci.pages.dev |
Summary of Changes
Hello @fengmk2, I'm Gemini Code Assist[^1]! 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-checkflag to alloxlintcommands inpackage.jsonscripts and documentation. -
Dependency Updates: The
oxlintdependency has been upgraded from version1.25.0to1.31.0, andoxlint-tsgolintfrom0.8.0to0.8.3. This includes updates to platform-specificoxlintpackages and their integrity hashes inpnpm-lock.yaml. -
Documentation Alignment: Project documentation, specifically
AGENTS.mdandCLAUDE.md, has been updated to reflect the newoxlint --type-aware --type-checkcommand, 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-specificpackage.jsonfiles (e.g.,packages/cookies,plugins/development), and project templates undertools/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 :thumbsup: and :thumbsdown: 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.
[^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.
Deploying egg-v3 with Β
Β Cloudflare Pages
| Latest commit: |
6b2fbd5
|
| Status: | Β β Β Deploy successful! |
| Preview URL: | https://9deff6f6.egg-v3.pages.dev |
| Branch Preview URL: | https://enable-oxlint-type-check.egg-v3.pages.dev |
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 87.40%. Comparing base (0cf6a3e) to head (6b2fbd5).
:warning: Report is 7 commits behind head on next.
Additional details and impacted files
@@ Coverage Diff @@
## next #5712 +/- ##
=======================================
Coverage 87.40% 87.40%
=======================================
Files 561 561
Lines 10932 10932
Branches 1238 1238
=======================================
Hits 9555 9555
Misses 1293 1293
Partials 84 84
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
| Diff | Package | Supply Chain Security |
Vulnerability | Quality | Maintenance | License |
|---|---|---|---|---|---|---|
| oxlint@β1.31.0 |