mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-03-05 13:30:32 -05:00
40 lines
786 B
YAML
40 lines
786 B
YAML
name: ESLint Check
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'js/**/*.js'
|
|
- 'js/package-lock.json'
|
|
- .github/workflows/eslint.yml
|
|
pull_request:
|
|
paths:
|
|
- 'js/**/*.js'
|
|
- 'js/package-lock.json'
|
|
- .github/workflows/eslint.yml
|
|
|
|
jobs:
|
|
eslint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
if [ -f js/package.json ]; then
|
|
cd js && npm ci
|
|
fi
|
|
|
|
- name: Run ESLint
|
|
run: |
|
|
if [ -f js/package.json ]; then
|
|
cd js && npx eslint .
|
|
else
|
|
npx eslint js/
|
|
fi
|