From a7350f588b694cf0429f3a68a9f1775a60bbac0b Mon Sep 17 00:00:00 2001 From: Levi Date: Sat, 24 Sep 2022 16:29:14 +0200 Subject: [PATCH] Create lint.yml --- .github/workflows/lint.yml | 18 ++++++++++++++++++ 1 file changed, 18 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 0000000..8fab0fd --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,18 @@ +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: .eslintrc.js + execute-on-files: + - index.js