Fix linting errors: Prettier formatting and markdown language specifi… #94
Workflow file for this run
This file contains hidden or 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: Code lint | |
| # This action works with pull requests and pushes | |
| on: push | |
| permissions: read-all | |
| jobs: | |
| prettier: | |
| name: Prettier code lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| # Make sure the actual branch is checked out when running on pull requests | |
| ref: ${{ github.head_ref }} | |
| # Installing Node + modern Yarn on GitHub Actions requires hack | |
| # https://github.com/actions/setup-node/issues/531#issuecomment-2960522861 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Configure dependency cache | |
| uses: actions/setup-node@v4 | |
| with: | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Check with prettier # Use yarn script instead of a prettier action, in order to load plugins from .prettierrc.js | |
| run: yarn run prettier-check | |
| markdownlint: | |
| name: Markdownlint code lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| # Installing Node + modern Yarn on GitHub Actions requires hack | |
| # https://github.com/actions/setup-node/issues/531#issuecomment-2960522861 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Configure dependency cache | |
| uses: actions/setup-node@v4 | |
| with: | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Check with markdownlint | |
| run: yarn run markdownlint-check |