Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

17 changes: 17 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
coverage
compiled
dist
dist-*
doc_build
node_modules
.swc
**/coverage
**/compiled
**/dist
**/dist-*
**/doc_build
**/auto-imports.d.ts
**/components.d.ts
**/@mf-types/**
**/http-import.lock.data/**
**/__snapshots__/**
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"endOfLine": "lf"
}
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["biomejs.biome"]
"recommendations": ["esbenp.prettier-vscode"]
}
10 changes: 4 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@
"files.exclude": {
"**/.DS_Store": true
},
"editor.defaultFormatter": "biomejs.biome",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"mdx.validate.validateFileLinks": "ignore",
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"cSpell.words": [
"rstest"
]
"cSpell.words": ["rstest"]
}
9 changes: 8 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ This file provides guidance for AI coding agents working in this repository.
**The primary goal of each example is to demonstrate "how a specific API achieves a specific effect through specific configuration".**

When creating or modifying examples:

- **Keep it minimal**: Only include code necessary to demonstrate the target feature/API
- **Avoid over-engineering**: Don't add complex business logic that distracts from the core demonstration
- **Focus on the tool, not the ecosystem**: For example, in a test runner example, focus on the test runner's APIs (mocking, assertions, configuration), not on complex DOM manipulation or third-party library integrations
- **One concept per example**: Each example should ideally demonstrate one main feature or configuration pattern
- **Clarity over completeness**: A simple, clear example is better than a comprehensive but confusing one

Example of good vs bad:

```
# Good: Demonstrates rstest's mocking API
- Simple mock function usage
Expand All @@ -35,10 +37,12 @@ Example of good vs bad:
## Quick Start (Local)

Prerequisites:

- Node.js per `.nvmrc`
- `corepack` enabled

Common commands:

- Install deps: `corepack enable && pnpm i`
- Build everything: `pnpm run build`
- Build a group:
Expand All @@ -50,13 +54,15 @@ Common commands:
- Test Rspack examples: `pnpm run test:rspack`

Working in a single example:

- `cd rspack/basic` (or any other example dir)
- `pnpm i` (workspace install is preferred at repo root)
- `pnpm run dev` / `pnpm run build` / `pnpm run test` (depends on the example)

## Where Things Live

Top-level directories:

- `rspack/`: Rspack examples (often package name prefix `example-*`).
- `rsbuild/`: Rsbuild examples (often package name prefix `rsbuild-*`).
- `rspress/`: Rspress examples (often package name prefix `rspress-*`).
Expand All @@ -65,7 +71,7 @@ Top-level directories:

## Coding Conventions

- Formatting and linting: `Biome` is used (see `biome.json`).
- Formatting and linting: `Prettier` and `Rslint` are used (see `.prettierrc` and `rslint.config.ts`).
- Default JS/TS quote style is single quotes.
- Line width is 100.
Comment on lines 72 to 76
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

The PR description says the remaining Biome-specific directives were updated, but there are still // biome-ignore directives present in other tracked files (e.g. rsbuild/vue-auto-import/auto-imports.d.ts, rsbuild/vue-element-plus/auto-imports.d.ts, rsbuild/vue-element-plus/components.d.ts). Either update/remove those directives as well or clarify in the description that only a subset was migrated in this PR.

Copilot uses AI. Check for mistakes.
- Prefer minimal, example-focused changes. This repo is a collection of runnable examples; avoid refactors that reduce clarity.
Expand All @@ -87,6 +93,7 @@ Top-level directories:
## Agent Workflow Expectations

When making changes:

- Identify the single example/package impacted.
- Keep changes scoped to that example unless explicitly requested.
- Update configuration consistently with the conventions in that subtree.
Expand Down
78 changes: 0 additions & 78 deletions biome.json

This file was deleted.

19 changes: 14 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,30 @@
"build:rspack": "pnpm --filter \"@rspack-example/*\" --stream build",
"build:rspress": "pnpm --filter \"@rspress-example/*\" --stream build",
"bump": "taze -l",
"prepare": "husky",
"lint": "rslint && prettier -c .prettierrc .vscode/extensions.json .vscode/settings.json AGENTS.md package.json pnpm-lock.yaml rslint.config.ts",
"lint:write": "prettier -w .prettierrc .vscode/extensions.json .vscode/settings.json AGENTS.md package.json pnpm-lock.yaml rslint.config.ts",
Comment on lines +14 to +15
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

The lint script only runs Prettier in check mode against a small, explicit list of root files, so formatting regressions in the actual example sources (e.g. rspack/, rsbuild/, etc.) won’t be caught by pnpm run lint. Consider changing this to a repo-wide Prettier check (e.g. run Prettier against the workspace globs or . with .prettierignore) so the replacement of Biome’s formatter is enforced consistently.

Suggested change
"lint": "rslint && prettier -c .prettierrc .vscode/extensions.json .vscode/settings.json AGENTS.md package.json pnpm-lock.yaml rslint.config.ts",
"lint:write": "prettier -w .prettierrc .vscode/extensions.json .vscode/settings.json AGENTS.md package.json pnpm-lock.yaml rslint.config.ts",
"lint": "rslint && prettier -c .",
"lint:write": "prettier -w .",

Copilot uses AI. Check for mistakes.
"prepare": "simple-git-hooks",
"sort-package-json": "npx sort-package-json \"rspack/*/package.json\" \"rsbuild/*/package.json\" \"rspress/*/package.json\" \"rsdoctor/*/package.json\" \"rslib/*/package.json\" \"rstest/*/package.json\"",
"test:rspack": "pnpm --filter \"@rspack-example/*\" --stream test",
"test:rstest": "pnpm --filter \"@rstest-example/*\" --stream test"
},
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged && pnpm exec rslint"
},
"lint-staged": {
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [
"npx @biomejs/biome check --write --no-errors-on-unmatched"
"*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}": [
"prettier -w"
],
"*.{css,scss,less,md,mdx,html,json,jsonc,yaml,yml,vue}": [
"prettier -w"
]
},
"devDependencies": {
"@biomejs/biome": "^2.3.13",
"@rslint/core": "^0.3.4",
"cross-env": "10.1.0",
"husky": "9.1.7",
"lint-staged": "16.2.7",
"prettier": "^3.8.1",
"simple-git-hooks": "^2.13.1",
"taze": "^19.9.2"
},
"packageManager": "pnpm@10.33.0"
Expand Down
Loading
Loading