-
Notifications
You must be signed in to change notification settings - Fork 1
chore: migrate lint/format stack to OXC #841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bcb27b6
e25cb53
a35f602
5651fb4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,9 +1,22 @@ | ||||||||||||||
| name: VitePress Pages | ||||||||||||||
|
|
||||||||||||||
| on: | ||||||||||||||
| pull_request: | ||||||||||||||
| branches: [main] | ||||||||||||||
| paths: | ||||||||||||||
| - "docs/**" | ||||||||||||||
| - "package.json" | ||||||||||||||
| - "bun.lock" | ||||||||||||||
| - ".oxlintrc.json" | ||||||||||||||
| - ".oxfmtrc.json" | ||||||||||||||
| push: | ||||||||||||||
| branches-ignore: | ||||||||||||||
| - "gh-pages" | ||||||||||||||
| branches: [main] | ||||||||||||||
| paths: | ||||||||||||||
| - "docs/**" | ||||||||||||||
| - "package.json" | ||||||||||||||
| - "bun.lock" | ||||||||||||||
| - ".oxlintrc.json" | ||||||||||||||
| - ".oxfmtrc.json" | ||||||||||||||
| workflow_dispatch: | ||||||||||||||
|
|
||||||||||||||
| concurrency: | ||||||||||||||
|
|
@@ -31,6 +44,20 @@ jobs: | |||||||||||||
| cache: "npm" | ||||||||||||||
| cache-dependency-path: docs/package.json | ||||||||||||||
|
|
||||||||||||||
| - name: Setup Bun | ||||||||||||||
| uses: oven-sh/setup-bun@v2 | ||||||||||||||
| with: | ||||||||||||||
| bun-version: latest | ||||||||||||||
|
|
||||||||||||||
| - name: Install OXC dependencies | ||||||||||||||
| run: bun install --frozen-lockfile | ||||||||||||||
|
|
||||||||||||||
| - name: Lint docs TS/JS with OXC | ||||||||||||||
| run: bun run lint | ||||||||||||||
|
|
||||||||||||||
| - name: Check docs TS/JS formatting with OXC | ||||||||||||||
| run: bun run format:check | ||||||||||||||
|
|
||||||||||||||
| - name: Install dependencies | ||||||||||||||
| working-directory: docs | ||||||||||||||
| run: npm install --frozen-lockfile | ||||||||||||||
|
Comment on lines
61
to
63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result:
Sources: 🌐 Web query:
💡 Result: npm v10 does not support a If you use Practical equivalent:
Sources Citations:
Replace
✅ Suggested fix - name: Install dependencies
working-directory: docs
- run: npm install --frozen-lockfile
+ run: npm ci📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
|
|
||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,3 +62,21 @@ cli-proxy-api-plus-integration-test | |
| boardsync | ||
| releasebatch | ||
| .cache | ||
|
|
||
| # Added by Spec Kitty CLI (auto-managed) | ||
| .windsurf/ | ||
| .qwen/ | ||
| .augment/ | ||
| .roo/ | ||
| .amazonq/ | ||
| .github/copilot/ | ||
| .kittify/.dashboard | ||
|
|
||
|
Comment on lines
+73
to
+74
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| # AI tool artifacts | ||
| .cursor/ | ||
| .kittify/ | ||
|
Comment on lines
+73
to
+77
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Redundant ignore entry for Line 77 ( 🤖 Prompt for AI Agents |
||
| .kilocode/ | ||
| .github/prompts/ | ||
| .github/copilot-instructions.md | ||
| .claudeignore | ||
| .llmignore | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "$schema": "https://oxc.rs/schemas/oxfmt.json", | ||
| "printWidth": 100, | ||
| "useTabs": false, | ||
| "indentWidth": 2 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "$schema": "https://oxc.rs/schemas/oxlintrc.json", | ||
| "ignorePatterns": [ | ||
| "**/node_modules/**", | ||
| "**/dist/**", | ||
| "**/.vitepress/dist/**", | ||
| "**/.vitepress/cache/**" | ||
| ], | ||
| "plugins": ["typescript"], | ||
| "rules": { | ||
| "correctness": "error", | ||
| "suspicious": "error" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # Contributing to cliproxyapi++ | ||
| # Contributing to cliproxyapi-plusplus | ||
|
|
||
| First off, thank you for considering contributing to **cliproxyapi++**! It's people like you who make this tool better for everyone. | ||
| First off, thank you for considering contributing to **cliproxyapi-plusplus**! It's people like you who make this tool better for everyone. | ||
|
|
||
| ## Code of Conduct | ||
|
|
||
|
|
@@ -26,7 +26,7 @@ By participating in this project, you agree to abide by our [Code of Conduct](CO | |
|
|
||
| #### Which repository to use? | ||
| - **Third-party provider support**: Submit your PR directly to [kooshapari/cliproxyapi-plusplus](https://github.com/kooshapari/cliproxyapi-plusplus). | ||
| - **Core logic improvements**: If the change is not specific to a third-party provider, please propose it to the [mainline project](https://github.com/kooshapari/cliproxyapi) first. | ||
| - **Core logic improvements**: If the change is not specific to a third-party provider, please propose it to the [mainline project](https://github.com/kooshapari/cliproxyapi-plusplus) first. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Core-logic contribution path is currently indistinguishable from provider PR path. Line 29 links to the same repository URL as Line 28, so the “mainline project first” instruction is unclear. Use the actual mainline URL or reword the instruction to match the intended workflow. Proposed doc fix-- **Core logic improvements**: If the change is not specific to a third-party provider, please propose it to the [mainline project](https://github.com/kooshapari/cliproxyapi-plusplus) first.
+- **Core logic improvements**: For non-provider changes, open an issue/PR in this repository first (or update this link to the intended mainline repository).🤖 Prompt for AI Agents |
||
|
|
||
| ## Governance | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,10 @@ | ||
| # CLIProxyAPI++ | ||
| # cliproxyapi-plusplus | ||
|
|
||
| Agent-native, multi-provider OpenAI-compatible proxy for production and local model routing. | ||
|
|
||
| ## Table of Contents | ||
| This is the Plus version of [cliproxyapi-plusplus](https://github.com/kooshapari/cliproxyapi-plusplus), adding support for third-party providers on top of the mainline project. | ||
|
|
||
| - [Key Features](#key-features) | ||
| - [Architecture](#architecture) | ||
| - [Getting Started](#getting-started) | ||
| - [Operations and Security](#operations-and-security) | ||
| - [Testing and Quality](#testing-and-quality) | ||
| - [Documentation](#documentation) | ||
| - [Contributing](#contributing) | ||
| - [License](#license) | ||
| All third-party provider support is maintained by community contributors; cliproxyapi-plusplus does not provide technical support. Please contact the corresponding community maintainer if you need assistance. | ||
|
|
||
| ## Key Features | ||
|
|
||
|
|
@@ -39,8 +32,29 @@ Agent-native, multi-provider OpenAI-compatible proxy for production and local mo | |
| ### Quick Start | ||
|
|
||
| ```bash | ||
| go build -o cliproxy ./cmd/server | ||
| ./cliproxy --config config.yaml | ||
| # Create deployment directory | ||
| mkdir -p ~/cli-proxy && cd ~/cli-proxy | ||
|
|
||
| # Create docker-compose.yml | ||
| cat > docker-compose.yml << 'EOF' | ||
| services: | ||
| cli-proxy-api: | ||
| image: eceasy/cli-proxy-api-plus:latest | ||
| container_name: cli-proxy-api-plus | ||
| ports: | ||
| - "8317:8317" | ||
| volumes: | ||
| - ./config.yaml:/CLIProxyAPI/config.yaml | ||
| - ./auths:/root/.cli-proxy-api | ||
| - ./logs:/CLIProxyAPI/logs | ||
| restart: unless-stopped | ||
| EOF | ||
|
|
||
| # Download example config | ||
| curl -o config.yaml https://raw.githubusercontent.com/kooshapari/cliproxyapi-plusplus/main/config.example.yaml | ||
|
|
||
| # Pull and start | ||
| docker compose pull && docker compose up -d | ||
|
Comment on lines
+35
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Pin Quick Start artifacts instead of floating On Lines [42] and [54], onboarding depends on mutable refs ( 🔧 Proposed hardening- image: eceasy/cli-proxy-api-plus:latest
+ image: eceasy/cli-proxy-api-plus:${CLIPROXY_TAG:-vX.Y.Z}
@@
-curl -o config.yaml https://raw.githubusercontent.com/kooshapari/cliproxyapi-plusplus/main/config.example.yaml
+curl -o config.yaml https://raw.githubusercontent.com/kooshapari/cliproxyapi-plusplus/${CLIPROXY_TAG:-vX.Y.Z}/config.example.yaml🤖 Prompt for AI Agents |
||
| ``` | ||
|
|
||
| ### Docker Quick Start | ||
|
|
@@ -85,9 +99,9 @@ npm run docs:build | |
|
|
||
| ## Contributing | ||
|
|
||
| 1. Create a worktree branch. | ||
| 2. Implement and validate changes. | ||
| 3. Open a PR with clear scope and migration notes. | ||
| This project only accepts pull requests that relate to third-party provider support. Any pull requests unrelated to third-party provider support will be rejected. | ||
|
|
||
| If you need to submit any non-third-party provider changes, please open them against the [mainline](https://github.com/kooshapari/cliproxyapi-plusplus) repository. | ||
|
|
||
| ## License | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -330,6 +330,18 @@ tasks: | |
| fi | ||
| staticcheck ./... | ||
|
|
||
| quality:oxc: | ||
| desc: "Run OXC lint + format checks for docs TypeScript/JavaScript files" | ||
| cmds: | ||
| - | | ||
| if ! command -v bun >/dev/null 2>&1; then | ||
| echo "[WARN] bun not found; skipping OXC checks" | ||
| exit 0 | ||
| fi | ||
|
Comment on lines
+333
to
+340
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not silently skip OXC checks in CI. Lines [337-340] currently return success when ✅ Proposed fix (strict in CI, permissive locally) quality:oxc:
desc: "Run OXC lint + format checks for docs TypeScript/JavaScript files"
cmds:
- |
if ! command -v bun >/dev/null 2>&1; then
- echo "[WARN] bun not found; skipping OXC checks"
- exit 0
+ if [ "${CI:-}" = "true" ] || [ "${CI:-}" = "1" ]; then
+ echo "[FAIL] bun not found; cannot run OXC checks in CI"
+ exit 1
+ fi
+ echo "[WARN] bun not found; skipping OXC checks locally"
+ exit 0
fi
bun install --frozen-lockfile
bun run lint
bun run format:checkAlso applies to: 358-358 🤖 Prompt for AI Agents |
||
| bun install --frozen-lockfile | ||
| bun run lint | ||
| bun run format:check | ||
|
|
||
| quality:ci: | ||
| desc: "Run non-mutating PR quality gates" | ||
| cmds: | ||
|
|
@@ -343,6 +355,7 @@ tasks: | |
| - task: quality:vet | ||
| - task: quality:staticcheck | ||
| - task: quality:shellcheck | ||
| - task: quality:oxc | ||
| - task: lint:changed | ||
|
|
||
| test:provider-smoke-matrix:test: | ||
|
|
@@ -376,6 +389,38 @@ tasks: | |
| - | | ||
| go test -run 'TestServer_StartupSmokeEndpoints|TestServer_StartupSmokeEndpoints/GET_v1_models|TestServer_StartupSmokeEndpoints/GET_v1_metrics_providers|TestServer_RoutesNamespaceIsolation|TestServer_ControlPlane_MessageLifecycle|TestServer_ControlPlane_IdempotencyKey_ReplaysResponseAndPreventsDuplicateMessages|TestServer_ControlPlane_IdempotencyKey_DifferentKeysCreateDifferentMessages' ./pkg/llmproxy/api | ||
|
|
||
| devops:status: | ||
| desc: "Show git status, remotes, and branch state" | ||
| cmds: | ||
| - git status --short --branch | ||
| - git remote -v | ||
| - git log --oneline -n 5 | ||
|
|
||
| devops:check: | ||
| desc: "Run shared DevOps checks for this repository" | ||
| cmds: | ||
| - bash scripts/devops-checker.sh | ||
|
|
||
| devops:check:ci: | ||
| desc: "Run shared DevOps checks including CI lane" | ||
| cmds: | ||
| - bash scripts/devops-checker.sh --check-ci | ||
|
|
||
| devops:check:ci-summary: | ||
| desc: "Run shared DevOps checks with CI lane and JSON summary" | ||
| cmds: | ||
| - bash scripts/devops-checker.sh --check-ci --emit-summary | ||
|
|
||
| devops:push: | ||
| desc: "Push branch with shared helper and fallback remote behavior" | ||
| cmds: | ||
| - bash scripts/push-cliproxyapi-plusplus-with-fallback.sh {{.CLI_ARGS}} | ||
|
|
||
| devops:push:origin: | ||
| desc: "Push using fallback remote only (skip primary)" | ||
| cmds: | ||
| - bash scripts/push-cliproxyapi-plusplus-with-fallback.sh --skip-primary {{.CLI_ARGS}} | ||
|
|
||
| lint:changed: | ||
| desc: "Run golangci-lint on changed/staged files only" | ||
| cmds: | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow installs dependencies twice (Bun at repo root, then npm under
docs/). This is likely to add substantial CI time and can lead to confusing “which node_modules is active?” behavior. Consider consolidating onto a single package manager for docs CI (either run the Bun steps inworking-directory: docsif the scripts live there, or drop the separatenpm installif Bun is meant to drive the docs install/build).