.github/workflows/lint.yml
name: lint
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
run-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@1a9e2138d905efd099035b49d8b7a3888c653ca8
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Run eslint
run: yarn eslint .
- name: Run stylelint
run: yarn stylelint
- name: Run prettier
run: yarn prettier --check .