mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add ci for eslint
This commit is contained in:
parent
770a3a1626
commit
e38a34384a
3 changed files with 30 additions and 0 deletions
9
.drone.yml
Normal file
9
.drone.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: eslint
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: run
|
||||||
|
image: nextcloudci/eslint:eslint-1
|
||||||
|
commands:
|
||||||
|
- ./run-eslint.sh
|
3
.eslintrc.yml
Normal file
3
.eslintrc.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
env:
|
||||||
|
browser: true
|
||||||
|
amd: true
|
18
run-eslint.sh
Normal file
18
run-eslint.sh
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# used this pull request for reference
|
||||||
|
# https://github.com/nextcloud/spreed/pull/48
|
||||||
|
ESLINT=$(which eslint || true)
|
||||||
|
if [ -z "$ESLINT" ]
|
||||||
|
then
|
||||||
|
echo "could not find eslint in $PATH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo checking scripts with $ESLINT
|
||||||
|
find -name "*.js" -print0 | xargs -0 $ESLINT
|
||||||
|
|
||||||
|
# use this line to test changes locally
|
||||||
|
#find src -name "*.js" -exec sh -c 'npx eslint $1' -- {} \;
|
Loading…
Add table
Add a link
Reference in a new issue