Skip to content

feat(core): Setup @sugarform/core (#8) #40

feat(core): Setup @sugarform/core (#8)

feat(core): Setup @sugarform/core (#8) #40

name: format-and-lint
on:
push:
branches: [main]
pull_request_target:
permissions: read-all
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- if: ${{ github.event_name != 'pull_request_target' }}
uses: actions/checkout@v3
- if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Run Prettier
run: pnpm run format:check
eslint:
runs-on: ubuntu-latest
steps:
- if: ${{ github.event_name != 'pull_request_target' }}
uses: actions/checkout@v3
- if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup turbo
uses: ./.github/actions/setup-turbo
with:
turbo-cache-key: lint
- name: Run ESLint
run: pnpm run lint