Compare commits

...

3 Commits

Author SHA1 Message Date
renovate[bot]
70ee047f7a
chore(deps): lock file maintenance 2026-04-07 03:11:59 +00:00
Tunglies
c2aa9d79ff
Revert "feat: add babel-plugin-react-compiler and configure Vite for optimized chunking"
This reverts commit 1005baabe699251d91b3169843d043c515801642.
2026-04-07 11:10:45 +08:00
Tunglies
bff78d96b4
chore: migrate formatter from prettier to biome 2026-04-07 01:32:14 +08:00
8 changed files with 534 additions and 594 deletions

View File

@ -1,13 +0,0 @@
# README.md
# Changelog.md
# CONTRIBUTING.md
.changelog_backups
pnpm-lock.yaml
src-tauri/target/
src-tauri/gen/
target
Cargo.lock
.github/workflows/*.lock.yml

View File

@ -1,5 +0,0 @@
{
"semi": false,
"singleQuote": true,
"plugins": ["prettier-plugin-toml"]
}

46
biome.json Normal file
View File

@ -0,0 +1,46 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.10/schema.json",
"assist": {
"actions": {
"source": {
"organizeImports": "off"
}
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 80
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "all",
"semicolons": "asNeeded"
}
},
"files": {
"includes": [
"**",
"!dist",
"!node_modules",
"!src-tauri/target",
"!src-tauri/gen",
"!target",
"!Cargo.lock",
"!pnpm-lock.yaml",
"!README.md",
"!Changelog.md",
"!CONTRIBUTING.md",
"!.changelog_backups",
"!.github/workflows/*.lock.yml"
]
}
}

View File

@ -26,8 +26,8 @@
"publish-version": "node scripts/publish-version.mjs",
"lint": "eslint -c eslint.config.ts --max-warnings=0 --cache --cache-location .eslintcache src",
"lint:fix": "eslint -c eslint.config.ts --max-warnings=0 --cache --cache-location .eslintcache --fix src",
"format": "prettier --write .",
"format:check": "prettier --check .",
"format": "biome format --write .",
"format:check": "biome format .",
"i18n:check": "node scripts/cleanup-unused-i18n.mjs",
"i18n:format": "node scripts/cleanup-unused-i18n.mjs --align --apply",
"i18n:types": "node scripts/generate-i18n-keys.mjs",
@ -81,6 +81,7 @@
},
"devDependencies": {
"@actions/github": "^9.0.0",
"@biomejs/biome": "^2.4.10",
"@eslint-react/eslint-plugin": "^4.0.0",
"@eslint/js": "^10.0.1",
"@tauri-apps/cli": "2.10.1",
@ -92,9 +93,8 @@
"@types/validator": "^13.15.10",
"@vitejs/plugin-legacy": "^8.0.0",
"@vitejs/plugin-react": "^6.0.1",
"adm-zip": "^0.5.16",
"axios": "^1.13.6",
"babel-plugin-react-compiler": "^1.0.0",
"adm-zip": "^0.5.16",
"cli-color": "^2.0.4",
"commander": "^14.0.3",
"cross-env": "^10.1.0",
@ -112,8 +112,6 @@
"jiti": "^2.6.1",
"lint-staged": "^16.4.0",
"node-fetch": "^3.3.2",
"prettier": "^3.8.1",
"prettier-plugin-toml": "^2.0.6",
"sass": "^1.98.0",
"tar": "^7.5.12",
"terser": "^5.46.1",
@ -123,12 +121,12 @@
"vite-plugin-svgr": "^5.0.0"
},
"lint-staged": {
"*.{ts,tsx}": [
"*.{ts,tsx,js,mjs}": [
"eslint --fix --max-warnings=0",
"prettier --write"
"biome format --write"
],
"*.{js,mjs,css,scss,json,md,toml,yaml,yml}": [
"prettier --write"
"*.{css,scss,json,md,yaml,yml}": [
"biome format --write"
]
},
"type": "module",

909
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -1,58 +1,57 @@
import { alpha, Box, styled } from '@mui/material'
export const ProfileBox = styled(Box)(({
theme,
'aria-selected': selected,
}) => {
const { mode, primary, text } = theme.palette
const key = `${mode}-${!!selected}`
export const ProfileBox = styled(Box)(
({ theme, 'aria-selected': selected }) => {
const { mode, primary, text } = theme.palette
const key = `${mode}-${!!selected}`
const backgroundColor = mode === 'light' ? '#ffffff' : '#282A36'
const backgroundColor = mode === 'light' ? '#ffffff' : '#282A36'
const color = {
'light-true': text.secondary,
'light-false': text.secondary,
'dark-true': alpha(text.secondary, 0.65),
'dark-false': alpha(text.secondary, 0.65),
}[key]!
const color = {
'light-true': text.secondary,
'light-false': text.secondary,
'dark-true': alpha(text.secondary, 0.65),
'dark-false': alpha(text.secondary, 0.65),
}[key]!
const h2color = {
'light-true': primary.main,
'light-false': text.primary,
'dark-true': primary.main,
'dark-false': text.primary,
}[key]!
const h2color = {
'light-true': primary.main,
'light-false': text.primary,
'dark-true': primary.main,
'dark-false': text.primary,
}[key]!
const borderSelect = {
'light-true': {
borderLeft: `3px solid ${primary.main}`,
width: `calc(100% + 3px)`,
marginLeft: `-3px`,
},
'light-false': {
width: '100%',
},
'dark-true': {
borderLeft: `3px solid ${primary.main}`,
width: `calc(100% + 3px)`,
marginLeft: `-3px`,
},
'dark-false': {
width: '100%',
},
}[key]
const borderSelect = {
'light-true': {
borderLeft: `3px solid ${primary.main}`,
width: `calc(100% + 3px)`,
marginLeft: `-3px`,
},
'light-false': {
width: '100%',
},
'dark-true': {
borderLeft: `3px solid ${primary.main}`,
width: `calc(100% + 3px)`,
marginLeft: `-3px`,
},
'dark-false': {
width: '100%',
},
}[key]
return {
position: 'relative',
display: 'block',
cursor: 'pointer',
textAlign: 'left',
padding: '8px 16px',
boxSizing: 'border-box',
backgroundColor,
...borderSelect,
borderRadius: '8px',
color,
'& h2': { color: h2color },
}
})
return {
position: 'relative',
display: 'block',
cursor: 'pointer',
textAlign: 'left',
padding: '8px 16px',
boxSizing: 'border-box',
backgroundColor,
...borderSelect,
borderRadius: '8px',
color,
'& h2': { color: h2color },
}
},
)

View File

@ -841,8 +841,7 @@ interface IProxySnellConfig extends IProxyBaseConfig {
version?: number
}
interface IProxyConfig
extends
IProxyBaseConfig,
extends IProxyBaseConfig,
IProxyDirectConfig,
IProxyDnsConfig,
IProxyHttpConfig,

View File

@ -10,11 +10,7 @@ export default defineConfig({
server: { port: 3000 },
plugins: [
svgr(),
react({
babel: {
plugins: ['babel-plugin-react-compiler'],
},
} as any),
react(),
legacy({
modernTargets: ['edge>=109', 'safari>=14'],
renderLegacyChunks: false,
@ -30,24 +26,6 @@ export default defineConfig({
outDir: '../dist',
emptyOutDir: true,
chunkSizeWarningLimit: 4000,
rollupOptions: {
output: {
manualChunks: (id) => {
if (id.includes('monaco-yaml')) return 'monaco-yaml'
if (
id.includes('node_modules/react/') ||
id.includes('node_modules/react-dom/')
)
return 'react'
if (id.includes('node_modules/react-router')) return 'router'
if (
id.includes('node_modules/i18next') ||
id.includes('node_modules/react-i18next')
)
return 'i18n'
},
},
},
},
resolve: {
alias: {
@ -58,13 +36,4 @@ export default defineConfig({
define: {
OS_PLATFORM: `"${process.platform}"`,
},
optimizeDeps: {
include: [
'react',
'react-dom',
'react-router-dom',
'i18next',
'react-i18next',
],
},
})