I need to take some non-trivial javascript and ensure that all code paths have code that is valid. For example:
var num = 1;
if (num == 2) {
badFunctionName();
}
and I need to do this from C#. On top of validating it, I need to produce nice error messages explaining line number and column number of bad code.
Any ideas on the best way to do this?
UPDATE - Corrected the confusion by saying javascript syntax. My intent is to ensure that all execution paths have valid javascript code (probably as defined by jslint).
Use eslint to validate your Javascript. Rules are configurable and pluggable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With