2021-02-04 23:52:18 -08:00
|
|
|
name: linter
|
|
|
|
|
|
|
|
# This action works with pull requests and pushes
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
2021-03-14 11:31:03 -07:00
|
|
|
prettier:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
# Make sure the actual branch is checked out when running on pull requests
|
|
|
|
ref: ${{ github.head_ref }}
|
2021-03-11 01:08:33 -08:00
|
|
|
fetch-depth: 0
|
2021-03-27 17:58:44 -07:00
|
|
|
|
|
|
|
- name: Prettier
|
2021-03-11 01:08:33 -08:00
|
|
|
uses: creyD/prettier_action@v3.1
|
|
|
|
with:
|
|
|
|
# This part is also where you can pass other options, for example:
|
|
|
|
prettier_options: --write **/*.{js,tsx,jsx,css,scss}
|
|
|
|
only_changed: true
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2021-03-27 17:58:44 -07:00
|
|
|
- name: Linter
|
|
|
|
uses: tj-actions/eslint-changed-files@v4
|
|
|
|
with:
|
|
|
|
config-path: '.eslintrc.js'
|
|
|
|
ignore-path: '.eslintignore'
|
|
|
|
extensions: 'ts,tsx,js,jsx'
|