node --check script.js

Category: Node.js & npm/yarn

node --check script.js

Syntax-check a script without running it

Parses script.js and reports syntax errors without executing any code, which is perfect for validating files before deploy or in CI. The -c flag is the short form. Combine with shell loops to lint-check every file in a project.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.