You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
It would be nice to be able to pass a flag to node that would tell it to just syntax check, and not execute, the given script.
With ruby you can run ruby -c file.rb and bash bash -n file.sh which both result in just a syntax check without any code execution. Both work in a similar fashion where proper syntax will result in no output with an exit code of 0, whereas improper syntax will generate debug information on stderr and an exit code of non-0.
We (job) currently use the following as a pre-commit git hook to syntax check json, ruby, bash, and javascript. Even though vm is a stability level of 3, it still could change in the future which could break this functionality. Having a single command line switch to do effectively what is done in check_js would be extremely convenient and useful.
It would be nice to be able to pass a flag to
nodethat would tell it to just syntax check, and not execute, the given script.With ruby you can run
ruby -c file.rband bashbash -n file.shwhich both result in just a syntax check without any code execution. Both work in a similar fashion where proper syntax will result in no output with an exit code of 0, whereas improper syntax will generate debug information on stderr and an exit code of non-0.We (job) currently use the following as a pre-commit git hook to syntax check json, ruby, bash, and javascript. Even though
vmis a stability level of 3, it still could change in the future which could break this functionality. Having a single command line switch to do effectively what is done incheck_jswould be extremely convenient and useful.