Initial commit #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: JavaScript | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
syntax: | |
name: "Check Syntax" | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Set up node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
- uses: actions/checkout@v4 | |
- run: echo "::add-matcher::.github/javascript-syntax.json" | |
- name: Remove files to be ignored | |
run: | | |
true | |
- run: | | |
! find dist/ -type f -name '*.js' -exec node -c '{}' \; 2>&1 \ | |
|awk 'BEGIN {m=0} /(.js):[0-9]+$/ {m=1; printf "%s - ",$0} m==1 && /^SyntaxError/ { m=0; print }' \ | |
|sed "s@$(pwd)@.@" \ | |
|grep '^' |