Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
cache: pnpm

- name: Install
run: pnpm install
run: pnpm install --no-frozen-lockfile

- name: Build
run: pnpm build
Expand Down
File renamed without changes.
6 changes: 0 additions & 6 deletions .prettierrc.mjs

This file was deleted.

3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"oxc.oxc-vscode",
"editorconfig.editorconfig",
"bradlc.vscode-tailwindcss",
"esbenp.prettier-vscode",
"vitest.explorer"
]
}
6 changes: 3 additions & 3 deletions .vscode/settings.example.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
"source.fixAll.oxc": "always"
},
"eslint.validate": ["javascript", "typescript", "javascriptreact", "typescriptreact"]
"oxc.typeAware": true
}
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,28 @@ It is a copy of [Vitesse](https://github.com/antfu/vitesse), but it uses React.

## Features

- ⚡️ [React](https://reactjs.org/) + [Vite](https://vitejs.dev/) + [pnpm](https://pnpm.io/)
- ⚡️ [React](https://reactjs.org/) + [Vite 8](https://vitejs.dev/) + [pnpm](https://pnpm.io/)
- 🦀 [Rolldown](https://rollup.rollupjs.org/) - Rust-powered bundler (10-30x faster)
- 🔧 [Oxc](https://oxc.rs/) - Rust-powered JavaScript toolchain
- [Oxlint](https://oxc.rs/) - ESLint alternative (50-100x faster)
- [Oxfmt](https://oxc.rs/) - Prettier alternative (30x faster)
- 🗂 [React Router](https://reactrouter.com/en/main)
- 😃 [React Use](https://streamich.github.io/react-use/)
- 🎨 [TailwindCSS](https://tailwindcss.com/) + [Iconify](https://iconify.design/docs/usage/css/tailwind/)
- 🦾 [ESLint](https://eslint.org/) + [Prettier](https://prettier.io/) + [CommitLint](https://commitlint.js.org/) + [Husky](https://typicode.github.io/husky/)
- 🦾 [CommitLint](https://commitlint.js.org/) + [Husky](https://typicode.github.io/husky/)
- ✅ [Vitest](https://vitest.dev/)
- ☁️ [Netlify](https://www.netlify.com/)

## Tech Stack

This project uses Anthony Fu's latest **ox + rust** tech stack:

| Old (JS) | New (Rust) | Speed |
|----------|------------|-------|
| ESLint | Oxlint | 50-100x faster |
| Prettier | Oxfmt | 30x faster |
| esbuild + Rollup | Rolldown | 10-30x faster |

## Try it now!

### GitHub Template
Expand Down
43 changes: 0 additions & 43 deletions eslint.config.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion lint-staged.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default {
'**/*.{js,jsx,tsx,ts}': ['eslint --fix', 'prettier --write'],
'**/*.{js,jsx,tsx,ts}': ['oxlint', 'oxfmt --write'],
};
10 changes: 10 additions & 0 deletions oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json.schemastore.org/oxlintrc.json",
"options": {
"typeAware": true
},
"rules": {
"no-console": "warn",
"no-debugger": "warn"
}
}
24 changes: 8 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"lint": "eslint --cache --fix --quiet .",
"format": "prettier --write ./src",
"lint": "oxlint",
"format": "oxfmt --write ./src",
"prepare": "husky",
"test": "vitest",
"typecheck": "tsc"
Expand All @@ -24,12 +24,11 @@
},
"packageManager": "pnpm@10.33.2",
"pnpm": {
"onlyBuiltDependencies": ["esbuild"]
"onlyBuiltDependencies": []
},
"devDependencies": {
"@commitlint/cli": "^20.5.0",
"@commitlint/config-conventional": "^20.5.0",
"@eslint/js": "^9.39.4",
"@iconify-json/carbon": "^1.2.20",
"@iconify/tailwind4": "^1.2.3",
"@tailwindcss/postcss": "^4.2.4",
Expand All @@ -42,25 +41,18 @@
"autoprefixer": "^10.5.0",
"babel-plugin-react-compiler": "^1.0.0",
"commitlint": "^20.5.0",
"esbuild": "^0.28.0",
"eslint": "^9.39.4",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-compiler": "19.1.0-rc.2",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.2",
"happy-dom": "^20.9.0",
"husky": "^9.1.7",
"lint-staged": "^16.4.0",
"oxlint": "^0.14.0",
"oxfmt": "^0.14.0",
"postcss": "^8.5.10",
"prettier": "^3.8.3",
"prettier-plugin-tailwindcss": "^0.7.3",
"rollup-plugin-visualizer": "^7.0.1",
"tailwindcss": "^4.2.4",
"terser": "^5.46.2",
"typescript": "^6.0.3",
"typescript-eslint": "^8.59.0",
"vite": "8.0.10",
"vitest": "4.1.5"
"vitest": "4.1.5",
"oxlint-tsgolint": "^0.14.0"
}
}
}
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default defineConfig(({ mode }) => {
...(mode === 'production'
? {
build: {
minify: 'esbuild',
// Vite 8 默认使用 Rolldown (Rust),无需配置 minify
cssTarget: 'chrome61',
modulePreload: {
polyfill: true,
Expand Down
Loading