[ticket/16775] Run xo linter in GitHub Actions runs

PHPBB3-16775
This commit is contained in:
Marc Alexander 2021-05-14 21:42:57 +02:00
parent f3c426389c
commit 378b2482d1
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
2 changed files with 24 additions and 0 deletions

20
.github/check-js.sh vendored Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash
#
# This file is part of the phpBB Forum Software package.
#
# @copyright (c) phpBB Limited <https://www.phpbb.com>
# @license GNU General Public License, version 2 (GPL-2.0)
#
# For full copyright and license information, please see
# the docs/CREDITS.txt file.
#
set -e
set +x
sudo npm install -g > /dev/null
npm ci > /dev/null
set -x
node_modules/xo/cli.js "phpBB/adm/style/*.js"
node_modules/xo/cli.js "phpBB/assets/javascript/*.js"
node_modules/xo/cli.js "phpBB/style/all/js/*.js"
node_modules/xo/cli.js "phpBB/style/prosilver/template/*.js"

View file

@ -84,6 +84,10 @@ jobs:
run: | run: |
.github/check-stylesheet.sh .github/check-stylesheet.sh
- name: Lint JavaScript files
run: |
.github/check-js.sh
- name: Check commit message - name: Check commit message
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
run: | run: |