# Copyright 2019-2023 Tauri Programme within The Commons Conservancy # SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: MIT name: Lint JavaScript on: push: branches: - v1 - v2 paths: &paths - '.github/workflows/lint-javascript.yml' - '.github/actions/setup-pnpm/**' - 'plugins/*/guest-js/**' # generated by `pnpm build`, checked below - 'plugins/*/api-iife.js' - 'plugins/*/src/init-iife.js' - 'plugins/*/rollup.config.js' - 'plugins/*/tsconfig.json' - 'shared/**' - 'packages/**' - 'eslint.config.js' - 'tsconfig.base.json' - 'pnpm-lock.yaml' - 'pnpm-workspace.yaml' - '**/package.json' pull_request: branches: - v1 - v2 paths: *paths concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: contents: read jobs: eslint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - uses: ./.github/actions/setup-pnpm # the type-checked lint rules (and packages/api-e2e) resolve the plugins' # types from their dist-js build output - name: build id: build run: pnpm build - name: eslint run: pnpm lint - name: ts:check run: pnpm ts:check # the build above regenerates the `api-iife.js` and `init-iife.js` files the Rust crates # embed, which must be committed along with the guest-js changes they come from - name: check generated files are up to date if: ${{ !cancelled() && steps.build.outcome == 'success' }} run: ./.scripts/ci/has-diff.sh