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
36 changes: 36 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"singleQuote": true,
"semi": false,
"printWidth": 100,
"trailingComma": "none",
"sortPackageJson": false,
"ignorePatterns": [
"out",
"dist",
"pnpm-lock.yaml",
"LICENSE.md",
"tsconfig.json",
"tsconfig.*.json",
"CONTRIBUTING*.md",
"README*.md",
"docs",
"resources",
"runtime",
"scripts",
"build",
"*.yaml",
"tailwind.config.js",
"vitest.config.*",
"Dockerfile*",
".env*",
"src/renderer/src/components/ui/*",
".github",
".cursor",
".vscode",
"electron.vite.config.ts",
"*.md",
"scripts/*",
"src/shadcn/**/*"
]
}
26 changes: 0 additions & 26 deletions .prettierignore

This file was deleted.

4 changes: 0 additions & 4 deletions .prettierrc.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "lokalise.i18n-ally", "esbenp.prettier-vscode", "TypeScriptTeam.native-preview"]
"recommendations": ["dbaeumer.vscode-eslint", "lokalise.i18n-ally", "oxc.oxc-vscode", "TypeScriptTeam.native-preview"]
}
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
## Coding Style & Naming Conventions
- TypeScript + Vue 3 Composition API; Pinia for state; Tailwind for styles.
- i18n: all user-facing strings use vue-i18n keys in `src/renderer/src/i18n`.
- Prettier: single quotes, no semicolons, width 100. Run `pnpm run format`.
- Oxfmt: single quotes, no semicolons, width 100. Run `pnpm run format`.
- OxLint for JS/TS; hooks run `lint-staged` and `typecheck`.
- Names: Vue components PascalCase (`ChatInput.vue`); variables/functions `camelCase`; types/classes `PascalCase`; constants `SCREAMING_SNAKE_CASE`.

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ We use GitHub to host code, to track issues and feature requests, as well as acc
## Code Style

- TypeScript + Vue 3 Composition API + Pinia; Tailwind + shadcn/ui for styling.
- Prettier enforces single quotes and no semicolons; `pnpm run format` before committing.
- Oxfmt enforces single quotes, no semicolons, and width 100; `pnpm run format` before committing.
- OxLint is used for linting (`pnpm run lint`). Type checking via `pnpm run typecheck` (node + web targets).
- Tests use Vitest (`test/main`, `test/renderer`). Name tests `*.test.ts`/`*.spec.ts`.
- Follow naming conventions: PascalCase components/types, camelCase variables/functions, SCREAMING_SNAKE_CASE constants.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ pnpm run dev
## 代码风格

- TypeScript + Vue 3 Composition API + Pinia;样式使用 Tailwind + shadcn/ui。
- Prettier:单引号、无分号;提交前请执行 `pnpm run format`。
- Oxfmt:单引号、无分号、宽度 100;提交前请执行 `pnpm run format`。
- OxLint 用于代码检查(`pnpm run lint`);类型检查 `pnpm run typecheck`(node + web 双目标)。
- 测试使用 Vitest(`test/main`、`test/renderer`),命名 `*.test.ts` / `*.spec.ts`。
- 命名约定:组件/类型 PascalCase,变量/函数 camelCase,常量 SCREAMING_SNAKE_CASE。
Expand Down
13 changes: 5 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"test:coverage": "vitest --coverage",
"test:watch": "vitest --watch",
"test:ui": "vitest --ui",
"format:check": "prettier --check .",
"format": "prettier --cache --write .",
"format:check": "oxfmt --check .",
"format": "oxfmt .",
"lint": "pnpm run lint:agent-cleanup && oxlint .",
"lint:agent-cleanup": "node scripts/agent-cleanup-guard.mjs",
"typecheck:node": "tsgo --noEmit -p tsconfig.node.json --composite false",
Expand Down Expand Up @@ -160,10 +160,10 @@
"mermaid": "^11.12.2",
"minimatch": "^10.1.1",
"monaco-editor": "^0.52.2",
"oxfmt": "^0.42.0",
"oxlint": "^1.35.0",
"picocolors": "^1.1.1",
"pinia": "^3.0.4",
"prettier": "^3.7.4",
"reka-ui": "^2.7.0",
"simple-git-hooks": "^2.13.1",
"stream-monaco": "^0.0.15",
Expand Down Expand Up @@ -195,11 +195,8 @@
"commit-msg": "node scripts/verify-commit.js \"$1\""
},
"lint-staged": {
"*.js": [
"prettier --write"
],
"*.ts": [
"prettier --parser=typescript --write"
"*.{js,ts}": [
"oxfmt --no-error-on-unmatched-pattern"
]
},
"pnpm": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ const confirmoAvailable = computed(() => confirmoStatus.value?.available ?? fals

const eventNames = HOOK_EVENT_NAMES

const buildEventRecord = <T,>(value: T) =>
const buildEventRecord = <T>(value: T) =>
Object.fromEntries(eventNames.map((name) => [name, value])) as Record<HookEventName, T>

const commandTesting = ref<Record<HookEventName, boolean>>(buildEventRecord(false))
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/components/sidepanel/BrowserPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const isPresenterError = (value: unknown): value is { error: string } => {
)
}

const callPresenter = async <T,>(
const callPresenter = async <T>(
action: string,
promise: Promise<T | { error: string } | null>
): Promise<T | null> => {
Expand Down
Loading