diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 2ce5f39..2c523d3 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -1,40 +1,27 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# ESLint is a tool for identifying and reporting on patterns -# found in ECMAScript/JavaScript code. -# More details at https://github.com/eslint/eslint -# and https://eslint.org - -name: ESLint - +name: ESLint Check on: push: branches: [ "main" ] pull_request: - # The branches below must be a subset of the branches above branches: [ "main" ] - schedule: - - cron: '42 11 * * 4' - jobs: eslint: - name: Run eslint scanning runs-on: ubuntu-latest - permissions: - contents: read - security-events: write - actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + timeout-minutes: 20 + strategy: + matrix: + node-version: [18, 20] steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Install ESLint - run: | - npm install eslint@8.10.0 - - - name: Run ESLint - run: npx eslint ./src - --config .eslintrc.json - --ext .js,.jsx,.ts,.tsx + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + with: + version: 8 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - name: Install dependencies + run: pnpm install + - name: Lint + run: pnpm run lint:check