diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3346785da..eb546bcac9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,23 @@ jobs: - run: pnpm install --frozen-lockfile - run: pnpm build + lint-and-format: + name: Lint & Format + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + with: + version: 10 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + - run: pnpm install --frozen-lockfile + - run: pnpm lint + - run: pnpm format:check + typecheck: name: Typecheck runs-on: ubuntu-latest diff --git a/lefthook.yml b/lefthook.yml index 6fb79cfe34..807f83be79 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -3,12 +3,12 @@ pre-commit: commands: lint: glob: "*.{js,jsx,ts,tsx}" - run: oxlint {staged_files} + run: npx oxlint {staged_files} format: glob: "*.{js,jsx,ts,tsx,json,css,md,yaml,yml}" - run: oxfmt --check {staged_files} + run: npx oxfmt --check {staged_files} commit-msg: commands: commitlint: - run: commitlint --edit "{1}" + run: npx commitlint --edit "{1}"