39a385ab04
- Add explicit version numbers (to prevent update conflicts) - Separate the steps and give them names, for better readability on workflow log - Only run on opened/synchronize
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
name: ✅ Check ESLint on PR
|
|
|
|
on:
|
|
pull_request: # TODO: change to pull_request_target for 'staging'
|
|
types: [opened, synchronize]
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
run-eslint:
|
|
name: ✅ Check ESLint on PR
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
# Checkout
|
|
# https://github.com/marketplace/actions/checkout
|
|
uses: actions/checkout@v4.2.2
|
|
|
|
- name: Setup Node.js
|
|
# Setup Node.js environment
|
|
# https://github.com/marketplace/actions/setup-node-js-environment
|
|
uses: actions/setup-node@v4.3.0
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Run npm install
|
|
run: npm ci
|
|
|
|
- name: Run ESLint
|
|
# Action ESLint
|
|
# https://github.com/marketplace/actions/action-eslint
|
|
uses: sibiraj-s/action-eslint@v3.0.1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
eslint-args: '--ignore-path=.gitignore --quiet'
|
|
extensions: 'js,ts'
|
|
annotations: true
|
|
ignore-patterns: |
|
|
dist/
|
|
lib/
|