From 9551ac0bc233cb09db6be8d29e01cfb1443d8419 Mon Sep 17 00:00:00 2001 From: huanghun <1101774489@qq.com> Date: Thu, 11 May 2023 12:26:23 +0800 Subject: [PATCH] feat(githubAction): add eslint yml file to github action --- .github/workflows/lint.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..ab1714cfc --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,17 @@ +name: Lint + +on: pull_request + +jobs: + eslint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: mrdivyansh/eslint-action@v1.0.7 + # GITHUB_TOKEN in forked repositories is read-only + # https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request + if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }} + with: + repo-token: ${{secrets.GITHUB_TOKEN}} + eslint-rc: /pkg/web/.eslintrc.js + execute-on-files: /pkg/web/src