mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-01-23 02:35:23 +00:00
42 lines
817 B
YAML
42 lines
817 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
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
eslint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v5
|
|
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
|