uniswap-interface-uncensored/.github/workflows/lint.yml

48 lines
1.2 KiB
YAML
Raw Normal View History

2020-09-24 19:18:57 +03:00
name: Lint
on:
push:
branches:
2021-02-03 21:56:02 +03:00
- main
2020-09-24 20:18:40 +03:00
pull_request_target:
branches:
2021-02-03 21:56:02 +03:00
- main
2020-09-24 19:18:57 +03:00
jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Checkout
2020-09-24 19:18:57 +03:00
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
2020-09-24 19:18:57 +03:00
with:
node-version: 14
2020-09-24 19:18:57 +03:00
registry-url: https://registry.npmjs.org
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
2020-09-24 19:18:57 +03:00
- name: Install dependencies
run: yarn install --frozen-lockfile
2020-09-24 19:18:57 +03:00
- name: Run linters
uses: wearerequired/lint-action@b98b0918aa71490373d2eca9e8e39a9bc1cc2517
2020-09-24 19:18:57 +03:00
with:
github_token: ${{ secrets.github_token }}
eslint: true
eslint_extensions: js,jsx,ts,tsx,json
auto_fix: true