Skip to content

Commit

Permalink
ci(editor): add lint and compile checks (#7346)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sysix authored Nov 19, 2024
1 parent b5a2027 commit 4b8aecc
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 7 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci_vscode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI VSCode

on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
paths:
- "pnpm-lock.yaml"
- "crates/oxc_language_server/**"
- "editors/vscode/**"
- ".github/worfkflows/ci_vscode.yml"
push:
branches:
- main
- "renovate/**"
paths:
- "pnpm-lock.yaml"
- "crates/oxc_language_server/**"
- "editors/vscode/**"
- ".github/worfkflows/ci_vscode.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

jobs:
compile:
name: Compile
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1
- uses: ./.github/actions/pnpm

- name: Compile VSCode
working-directory: editors/vscode
run: pnpm run compile

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1
- uses: ./.github/actions/pnpm

- name: Lint VSCode
working-directory: editors/vscode
run: pnpm run lint
6 changes: 6 additions & 0 deletions editors/vscode/oxlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"categories": {
"correctness": "error",
"perf": "error"
}
}
4 changes: 3 additions & 1 deletion editors/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@
"package": "vsce package --no-dependencies -o oxc_language_server.vsix",
"install-extension": "code --install-extension oxc_language_server.vsix --force",
"server:build:debug": "cargo build -p oxc_language_server",
"server:build:release": "cross-env CARGO_TARGET_DIR=./target cargo build -p oxc_language_server --release"
"server:build:release": "cross-env CARGO_TARGET_DIR=./target cargo build -p oxc_language_server --release",
"lint": "npx oxlint --config=oxlint.json --tsconfig=tsconfig.json"
},
"devDependencies": {
"@types/node": "^22.0.0",
Expand All @@ -144,6 +145,7 @@
"cross-env": "^7.0.3",
"esbuild": "^0.24.0",
"ovsx": "^0.10.0",
"oxlint": "^0.11.1",
"typescript": "^5.4.5"
},
"dependencies": {
Expand Down
89 changes: 83 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4b8aecc

Please sign in to comment.