chore(web): add default frontend oxc tooling (#5585)

- add oxlint and oxfmt configuration for web/default quality checks

- replace ESLint and Prettier scripts with protected-header Oxc formatting

- update frontend workspace dependencies for oxlint and oxfmt
This commit is contained in:
QuentinHsu
2026-06-19 14:58:53 +08:00
committed by GitHub
parent 0c806db996
commit 5b4839fa37
10 changed files with 522 additions and 311 deletions
+8 -15
View File
@@ -1,17 +1,18 @@
{
"name": "newapi-web",
"private": false,
"version": "1.0.0",
"private": false,
"type": "module",
"scripts": {
"dev": "rsbuild dev",
"build": "rsbuild build",
"build:check": "tsc -b && rsbuild build",
"typecheck": "tsc -b",
"lint": "eslint .",
"lint": "oxlint -c .oxlintrc.json .",
"lint:fix": "oxlint -c .oxlintrc.json . --fix",
"preview": "rsbuild preview",
"format:check": "prettier --check .",
"format": "prettier --write .",
"format:check": "node scripts/format-with-protected-headers.mjs --check",
"format": "node scripts/format-with-protected-headers.mjs --write",
"copyright:check": "node scripts/add-copyright.mjs --check",
"copyright": "node scripts/add-copyright.mjs",
"i18n:sync": "node scripts/sync-i18n.mjs",
@@ -74,29 +75,21 @@
"zustand": "^5.0.13"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@rsbuild/core": "^2.0.7",
"@rsbuild/plugin-react": "^2.0.0",
"@tanstack/eslint-plugin-query": "^5.100.14",
"@tanstack/react-query-devtools": "^5.100.14",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/router-plugin": "^1.168.11",
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
"@types/node": "^25.9.1",
"@types/react": "^19.2.15",
"@types/react-dom": "^19.2.3",
"@xyflow/react": "^12.10.2",
"embla-carousel-react": "^8.6.0",
"eslint": "^10.4.0",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.2",
"globals": "^17.6.0",
"knip": "^6.14.2",
"prettier": "catalog:",
"prettier-plugin-tailwindcss": "^0.8.0",
"oxfmt": "catalog:",
"oxlint": "catalog:",
"shadcn": "^4.8.0",
"typescript": "~6.0.3",
"typescript-eslint": "^8.59.4"
"typescript": "~6.0.3"
},
"overrides": {
"brace-expansion": "2.1.1",