Skip to content

Commit

Permalink
ci: update lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
StarHeartHunt committed Jun 3, 2024
1 parent bf78d67 commit 8fdb0d5
Showing 1 changed file with 12 additions and 37 deletions.
49 changes: 12 additions & 37 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,26 @@
name: Lint

on:
pull_request_target:
branches: [main]
push:
branches:
- main

permissions:
contents: read
pull-requests: write
pull_request:
branches:
- main

jobs:
eslint:
name: runner / eslint
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/checkout@v4

- name: Setup Node Environment
uses: ./.github/actions/setup-node

- name: Run eslint
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review # Change reporter.
fail_on_error: true
eslint_flags: "--cache --report-unused-disable-directives \"**/*.{js,jsx,ts,tsx,cjs,mjs,vue}\""
- name: Lint
run: pnpm run lint

stylelint:
name: runner / stylelint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup Node Environment
uses: ./.github/actions/setup-node

- name: Run stylelint
uses: reviewdog/action-stylelint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review # Change reporter.
fail_on_error: true
stylelint_input: "\"**/*.{css,scss}\""
- name: Typecheck and Build
run: pnpm run build

0 comments on commit 8fdb0d5

Please sign in to comment.