Fix CI lint command (#7554)

This commit is contained in:
Bjorn Lu 2023-07-03 21:55:02 +08:00 committed by GitHub
parent e7cea6f755
commit 7419bb6cf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,27 +53,8 @@ jobs:
- name: Build (ignoring failures)
run: pnpm run build || true
# Lint autofix cannot run on forks, so just skip those! See https://github.com/wearerequired/lint-action/issues/13
- name: Lint (External)
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != github.repository_owner }}
run: pnpm run lint
# Otherwise, run lint autofixer
- name: Lint
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }}
uses: wearerequired/lint-action@v2.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
eslint: true
eslint_extensions: js,ts,cts,mts,cjs,mjs
prettier: false
auto_fix: false
git_name: fredkbot
git_email: fred+astrobot@astro.build
commit_message: "chore(lint): ${linter} fix"
github_token: ${{ secrets.GITHUB_TOKEN }}
neutral_check_on_warning: true
run: pnpm run lint
# Checks that the formatter runs successfully on all files
# In the future, we may have this fail PRs on unformatted code