From: Tim Düsterhus Date: Tue, 15 Jun 2021 07:48:19 +0000 (+0200) Subject: Add ES 5 syntax check (#4291) X-Git-Tag: 5.4.0_Beta_2~4^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2d35dbce84fbe97e8dc80629d889b51953e1641e;p=GitHub%2FWoltLab%2FWCF.git Add ES 5 syntax check (#4291) --- diff --git a/.github/workflows/javascript.yml b/.github/workflows/javascript.yml index 985b9127ab..dac9327b46 100644 --- a/.github/workflows/javascript.yml +++ b/.github/workflows/javascript.yml @@ -29,3 +29,22 @@ jobs: |awk 'BEGIN {m=0} /(.js):[0-9]+$/ {m=1; printf "%s - ",$0} m==1 && /^SyntaxError/ { m=0; print }' \ |sed "s@$(pwd)@.@" \ |grep '^' + es5: + name: "Check ES5 Syntax" + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Set up node.js + uses: actions/setup-node@v1 + with: + node-version: "12" + - uses: actions/checkout@v2 + - run: npm i es5-validator debug --save-dev + - name: Remove files to be ignored + run: | + rm wcfsetup/install/files/js/3rdParty/prism/build.js + rm wcfsetup/install/files/js/3rdParty/zxcvbn.js + - run: | + ! find wcfsetup/ -type f -name '*.js' -exec node_modules/.bin/es5-validator '{}' \; 2>&1 \ + |grep 'ECMAScript 5 validate failed'