Skip to content

Commit 6de1d54

Browse files
authored
chore: update oxfmt to 0.19 (#5737)
1 parent 545cee6 commit 6de1d54

243 files changed

Lines changed: 3462 additions & 3522 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
open_collective: eggjs # Replace with a single Open Collective username
44

5+
56
# github: [ fengmk2, popomore, atian25, dead_horse ] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
67
# patreon: # Replace with a single Patreon username
78
# ko_fi: # Replace with a single Ko-fi username

.oxfmtrc.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"tegg/core/aop-runtime/test/aop-runtime.test.ts",
88
"packages/core/test/fixtures/load_dirs/syntax_error/*",
99
"packages/core/test/fixtures/syntaxerror/*",
10-
"packages/core/test/fixtures/load_context_syntax_error/**/*"
10+
"packages/core/test/fixtures/load_context_syntax_error/**/*",
11+
"CHANGELOG.md"
1112
],
1213
"experimentalSortImports": {
1314
"groups": [
@@ -20,5 +21,8 @@
2021
],
2122
"newlinesBetween": true,
2223
"order": "asc"
24+
},
25+
"yaml": {
26+
"singleQuote": true
2327
}
2428
}

.prettierignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Run `pnpm install` to hydrate the workspace (Node.js ≥ 20.19.0 is required). B
1010

1111
## Coding Style & Naming Conventions
1212

13-
The repository is ESM-first and TypeScript-heavy; prefer `.ts` sources and exports over CommonJS. Prettier and `oxlint --type-aware` enforce formatting—two-space indentation, trailing commas, and semicolons are the defaults. Name files in lowercase with hyphens (e.g. `loader-context.ts`), classes in PascalCase, and functions/variables in camelCase. Re-export types thoughtfully to keep the public API stable.
13+
The repository is ESM-first and TypeScript-heavy; prefer `.ts` sources and exports over CommonJS. `oxfmt` and `oxlint --type-aware` enforce formatting—two-space indentation, trailing commas, and semicolons are the defaults. Name files in lowercase with hyphens (e.g. `loader-context.ts`), classes in PascalCase, and functions/variables in camelCase. Re-export types thoughtfully to keep the public API stable.
1414

1515
## Testing Guidelines
1616

CLAUDE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ The framework follows a specific loading order:
215215
- `pnpm run site:dev` - Start VitePress documentation development server
216216
- `pnpm run site:build` - Build VitePress documentation site
217217
- `pnpm run site:preview` - Preview built documentation site
218-
- `pnpm run site:prettier` - Format documentation files
219218
- `pnpm run puml` - Generate PlantUML diagrams
220219

221220
## Key Configuration Files
@@ -591,7 +590,7 @@ This approach ensures:
591590
- Provides additional linting rules beyond TypeScript checking
592591
- Significantly faster than ESLint with comparable rules
593592
- Uses `--type-aware` flag for enhanced TypeScript analysis
594-
- **Prettier** - Code formatting (primarily for documentation)
593+
- **oxfmt** - Code formatting (primarily for documentation)
595594
- Run `pnpm lint` to check code quality with oxlint
596595
- Run `pnpm lint:fix` to auto-fix linting issues
597596
- Each package uses oxlint which automatically respects `.gitignore` patterns

examples/helloworld-commonjs/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,8 @@
22
"name": "helloworld-commonjs",
33
"version": "1.0.0",
44
"private": true,
5-
"type": "commonjs",
65
"description": "Hello World example using CommonJS",
7-
"dependencies": {
8-
"egg": "workspace:*"
9-
},
10-
"devDependencies": {
11-
"@eggjs/bin": "workspace:*",
12-
"oxlint": "catalog:"
13-
},
6+
"type": "commonjs",
147
"scripts": {
158
"dev": "egg-bin dev",
169
"debug": "egg-bin debug",
@@ -21,6 +14,13 @@
2114
"start": "egg-scripts start --daemon",
2215
"stop": "egg-scripts stop"
2316
},
17+
"dependencies": {
18+
"egg": "workspace:*"
19+
},
20+
"devDependencies": {
21+
"@eggjs/bin": "workspace:*",
22+
"oxlint": "catalog:"
23+
},
2424
"engines": {
2525
"node": ">=22.18.0"
2626
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "app-biz",
3+
"type": "module",
34
"eggModule": {
45
"name": "appBiz"
5-
},
6-
"type": "module"
6+
}
77
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "app-port",
3+
"type": "module",
34
"eggModule": {
45
"name": "appPort"
5-
},
6-
"type": "module"
6+
}
77
}

examples/helloworld-tegg/package.json

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,8 @@
22
"name": "helloworld-tegg",
33
"version": "1.0.0",
44
"private": true,
5-
"type": "module",
65
"description": "Hello World example using tegg",
7-
"egg": {
8-
"typescript": true
9-
},
10-
"dependencies": {
11-
"@eggjs/scripts": "workspace:",
12-
"@eggjs/tracer": "workspace:*",
13-
"egg": "workspace:*"
14-
},
15-
"devDependencies": {
16-
"@eggjs/bin": "workspace:*",
17-
"@eggjs/mock": "workspace:*",
18-
"@eggjs/tsconfig": "workspace:*",
19-
"tsdown": "catalog:",
20-
"typescript": "catalog:",
21-
"vitest": "catalog:"
22-
},
23-
"scripts": {
24-
"dev": "egg-bin dev",
25-
"debug": "egg-bin debug",
26-
"test": "vitest run",
27-
"cov": "vitest run --coverage",
28-
"lint": "eslint . --ext .ts",
29-
"ci": "pnpm run lint && pnpm run cov",
30-
"prepublishOnly": "pnpm run build",
31-
"start": "egg-scripts start --daemon",
32-
"stop": "egg-scripts stop",
33-
"typecheck": "tsgo --noEmit && tsc --noEmit",
34-
"build": "tsdown"
35-
},
36-
"engines": {
37-
"node": ">=22.18.0"
38-
},
6+
"type": "module",
397
"exports": {
408
"./app": "./app.ts",
419
"./app/biz/Foo": "./app/biz/Foo.ts",
@@ -65,5 +33,37 @@
6533
"./config/plugin": "./dist/config/plugin.js",
6634
"./package.json": "./package.json"
6735
}
36+
},
37+
"scripts": {
38+
"dev": "egg-bin dev",
39+
"debug": "egg-bin debug",
40+
"test": "vitest run",
41+
"cov": "vitest run --coverage",
42+
"lint": "eslint . --ext .ts",
43+
"ci": "pnpm run lint && pnpm run cov",
44+
"prepublishOnly": "pnpm run build",
45+
"start": "egg-scripts start --daemon",
46+
"stop": "egg-scripts stop",
47+
"typecheck": "tsgo --noEmit && tsc --noEmit",
48+
"build": "tsdown"
49+
},
50+
"dependencies": {
51+
"@eggjs/scripts": "workspace:",
52+
"@eggjs/tracer": "workspace:*",
53+
"egg": "workspace:*"
54+
},
55+
"devDependencies": {
56+
"@eggjs/bin": "workspace:*",
57+
"@eggjs/mock": "workspace:*",
58+
"@eggjs/tsconfig": "workspace:*",
59+
"tsdown": "catalog:",
60+
"typescript": "catalog:",
61+
"vitest": "catalog:"
62+
},
63+
"engines": {
64+
"node": ">=22.18.0"
65+
},
66+
"egg": {
67+
"typescript": true
6868
}
6969
}

0 commit comments

Comments
 (0)