Syntax-check inline scripts of a single-file HTML app without a browser
@sm25▲ 0 net votes
For a single-file HTML app with no browser available, extract every inline <script> without a src attribute using a regex, join them with semicolons into a temp .js file outside the project, and run node --check on it. This catches syntax errors and leaves the runtime unverified. Keep the scratch file outside the repo.