mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-01-23 02:35:23 +00:00
chore: run EsLint on PRs
This commit is contained in:
parent
2f903bb87e
commit
6b5908b202
1 changed files with 35 additions and 0 deletions
35
.github/workflows/eslint.yml
vendored
Normal file
35
.github/workflows/eslint.yml
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
name: ESLint Check
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'js/**/*.js'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'js/**/*.js'
|
||||
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue