Skip to content

chore: use proper types #877

chore: use proper types

chore: use proper types #877

Workflow file for this run

name: Lint
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
changes:
name: Detect relevant changes
uses: ./.github/workflows/changes.yml
lint-node:
name: JS/TS Lint & Prettier
needs: changes
if: ${{ github.event_name == 'workflow_dispatch' || needs.changes.outputs.node == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v5
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build native modules
shell: bash
run: SKIP_IF_NO_SCRIPT=1 PREFER_SCRIPT=types pnpm build:modules
- name: Run ESLint
run: pnpm lint:eslint
- name: Run TypeScript type check (root)
run: pnpm lint:types:root
- name: Run Svelte type check (gui)
run: pnpm lint:types:gui
- name: Check Prettier formatting
run: pnpm prettier --check .
lint-rust:
name: Clippy & Rustfmt (${{ matrix.os }})
needs: changes
if: ${{ github.event_name == 'workflow_dispatch' || needs.changes.outputs.rust == 'true' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ vars.RUST_VERSION || 'stable' }}
components: clippy,rustfmt
- name: Run Clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: Check Rustfmt formatting
run: cargo fmt --all -- --check