-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 858 Bytes
/
javascript.yml
File metadata and controls
37 lines (34 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: JavaScript
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
syntax:
name: "Check Syntax"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- 22
- 23
- 24
steps:
- name: Set up node.js
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v5
- 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 '^'