fix (lint): Fix all lint errors reporting by eslint. #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the main branch | |
push: | |
# branches: | |
# - main | |
pull_request: | |
# branches: | |
# - main | |
env: | |
PNPM_VERSION: 8.6.11 | |
NODE_VERSION: 18 | |
jobs: | |
run-linters: | |
name: Run linters | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Install node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
run_install: false | |
# ESLint and Prettier must be in `package.json` | |
- name: Install dependencies | |
run: pnpm i | |
- name: Run lint | |
run: pnpm run lint | |
# Currently incompatible with ESlint 9 (https://github.com/wearerequired/lint-action/pull/799) | |
# - name: Run linters | |
# uses: wearerequired/lint-action@v2 | |
# with: | |
# eslint: true | |
# prettier: false #runs part of eslint | |
# autofix: false #does not work well with pull requests https://github.com/wearerequired/lint-action?tab=readme-ov-file#limitations |