setup linter #81
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ESLint | |
on: | |
push: | |
branches: | |
- '**' | |
jobs: | |
ci-skip-check: | |
runs-on: ubuntu-latest | |
if: "! contains(github.event.head_commit.message, '[ci skip]')" | |
steps: | |
- run: echo "${{ github.event.head_commit.message }}" | |
lint: | |
runs-on: ubuntu-latest | |
needs: ci-skip-check | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Initialize submodules | |
run: git submodule update --init --recursive | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '20' | |
- name: Cache npm | |
uses: actions/cache@v1 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- run: npm install | |
- run: npm run lint |