Update README.md #14
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: JS Syntax Check | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
syntax-check: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository code | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Check for syntax errors in JavaScript files | |
- name: Run JS Syntax Check | |
run: | | |
for file in $(find . -name "*.js"); do | |
echo "Checking $file for syntax errors..." | |
node --check "$file" || echo "Skipping $file due to syntax error or missing modules" | |
done |