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
19 changes: 19 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Pages workspace instructions

## Tooling baseline

- Use `oxlint` for code linting and `oxfmt` for formatting.
- Do not introduce Biome config or Biome scripts.
- Keep `lint-staged` tasks aligned with `oxlint --fix` and `oxfmt`.

## Quality workflow

- Local quick check: `bun run lint` + `bun run format:check`.
- Full verification: `bun run quality`.
- Before creating PRs, run: `bun run quality`.

## File and code style

- Follow `.editorconfig` and `.oxfmtrc.json`.
- Prefer safe auto-fixes first (`bun run lint:fix`).
- Use dangerous fixes only when requested (`bun run lint:fix:unsafe`).
44 changes: 22 additions & 22 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
groups:
patch-updates:
patterns:
- "*"
update-types:
- "patch"
minor-updates:
patterns:
- "*"
update-types:
- "minor"
pull-request-branch-name:
separator: "-"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
# version: 2
# updates:
# - package-ecosystem: "npm"
# directory: "/"
# schedule:
# interval: "daily"
# groups:
# patch-updates:
# patterns:
# - "*"
# update-types:
# - "patch"
# minor-updates:
# patterns:
# - "*"
# update-types:
# - "minor"
# pull-request-branch-name:
# separator: "-"
# ignore:
# - dependency-name: "*"
# update-types: ["version-update:semver-major"]
37 changes: 37 additions & 0 deletions .github/skills/oxc-workflow/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: oxc-workflow
description: 'Use when migrating from Biome/ESLint/Prettier to Oxc, maintaining oxlint + oxfmt configs, updating lint-staged/husky/CI, or fixing lint and formatting regressions.'
argument-hint: 'Describe the migration goal, constraints, and target files.'
---

# Oxc Workflow Skill

## When to use

- Migrate quality tooling to `oxlint` and `oxfmt`
- Create or adjust `.oxlintrc.json` and `.oxfmtrc.json`
- Align `package.json` scripts, `lint-staged`, and Husky hooks
- Build CI for lint/format/typecheck/build gates
- Batch-fix violations after a ruleset change

## Procedure

1. Check current scripts and CI entries for legacy tool references.
2. Update `package.json` scripts to include `lint`, `lint:fix`, `lint:fix:unsafe`, `format`, `format:check`, and optional `quality`.
3. Ensure `lint-staged` runs `oxlint --fix` and `oxfmt` for code files.
4. Add/update `.oxlintrc.json` and `.oxfmtrc.json`.
5. Run dependency install and execute lint, format check, type check, and build.
6. Apply safe auto-fixes first, then minimal manual fixes for remaining errors.
7. Keep CI workflow consistent with local commands.

## Validation checklist

- `bun run lint` passes
- `bun run format:check` passes
- `bun run check` passes
- `bun run build` passes
- No remaining `biome` command in tracked config files

## References

- [Oxc Quality Reference](./references/quality-workflow.md)
24 changes: 24 additions & 0 deletions .github/skills/oxc-workflow/references/quality-workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Oxc quality workflow reference

## Canonical scripts

- `bun run lint`: run `oxlint` checks
- `bun run lint:fix`: apply safe fixes
- `bun run lint:fix:unsafe`: apply suggestions and dangerous fixes only when explicitly requested
- `bun run format`: run `oxfmt` write mode
- `bun run format:check`: verify formatting in CI/local checks
- `bun run quality`: lint + format check + astro check + build

## CI order

1. Install dependencies with lockfile
2. Run lint
3. Run format check
4. Run type check
5. Run build

## Common migration notes

- Replace tool-specific ignore comments with neutral comments or `oxlint-disable` directives.
- Avoid reintroducing Biome config files.
- Keep ignore patterns aligned across lint/format config and repository conventions.
24 changes: 0 additions & 24 deletions .github/workflows/biome.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Code quality

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
quality:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install dependencies
run: bun install

- name: Lint
run: bun run lint

- name: Format check
run: bun run format:check

- name: Type check
run: bun run check

- name: Build
run: bun run build
8 changes: 8 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"printWidth": 128,
"semi": true,
"singleQuote": false,
"trailingComma": "all",
"ignorePatterns": ["dist/**", "node_modules/**", ".astro/**", "public/**"]
}
13 changes: 13 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"env": {
"browser": true,
"node": true,
"es2025": true
},
"plugins": ["typescript", "react", "import", "unicorn"],
"ignorePatterns": ["dist/**", "node_modules/**", ".astro/**", "public/**", "**/*.astro", "src/env.d.ts"],
"rules": {
"no-debugger": "error"
}
}
20 changes: 20 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.formatOnSave": true,
"oxc.fmt.configPath": ".oxfmtrc.json",
"[typescript]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[json]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
}
}
73 changes: 0 additions & 73 deletions biome.json

This file was deleted.

10 changes: 5 additions & 5 deletions config/site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ social:
github:
url: https://github.com/WangWindow # 替换为你的 GitHub 链接
icon: ri:github-fill # Remix Icon 的 GitHub 图标
color: '#191717' # (可选) 图标颜色
color: "#191717" # (可选) 图标颜色
email:
url: mailto:wangwindow2004@gmail.com # 替换为你的邮箱,需加 mailto: 前缀
icon: ri:mail-line
color: '#55acd5'
color: "#55acd5"
rss:
url: /rss.xml # 站内 RSS 订阅地址
icon: ri:rss-line
color: '#ff6600'
color: "#ff6600"
# -------------------------------------------------------------------------
# 以下是更多可选的社交平台配置示例,取消注释并修改即可启用:
# -------------------------------------------------------------------------
Expand Down Expand Up @@ -196,7 +196,7 @@ friends:
owner: cos
desc: FE / ACG / 手工 / 深色模式强迫症 / INFP / 兴趣广泛养两只猫的老宅女 / remote
image: https://blog.cosine.ren/img/avatar.webp
color: '#ed788b'
color: "#ed788b"

# =============================================================================
# Announcements
Expand Down Expand Up @@ -325,7 +325,7 @@ navigation:
# Comment System
# =============================================================================
comment:
provider: none # 'giscus' | 'none'
provider: none # 'giscus' | 'none'
# giscus:
# repo: username/repo # GitHub 仓库名 (owner/repo 格式)
# repoId: R_kgDOxxxxxx # 仓库 ID (从 giscus.app 获取)
Expand Down
Loading
Loading