Skip to content

fix: Upgrade jQuery from 2.1.4 to 3.7.1 #4272

fix: Upgrade jQuery from 2.1.4 to 3.7.1

fix: Upgrade jQuery from 2.1.4 to 3.7.1 #4272

Workflow file for this run

name: ESLint
on:
pull_request:
branches: [master]
jobs:
lint:
name: Lint updated JavaScript files with ESLint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Get changed JavaScript files
id: get_files
run: |
CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} -- '*.js' | xargs -I {} sh -c 'test -f "{}" && echo "{}"' || true)
echo "files<<EOF" >> $GITHUB_ENV
echo "$CHANGED_FILES" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Install dependencies
run: npm install eslint
- name: Run ESLint on changed files
if: env.files != ''
run: |
echo "Linting the following files:"
echo "$files"
if [ -n "$files" ]; then
echo "$files" | xargs npx eslint
else
echo "No existing JavaScript files to lint."
fi