Hi all, is there a way to validate syntax errors o...
# suitescript
b
Hi all, is there a way to validate syntax errors on SuiteCloud CLI without using the file:upload --paths command? Working on an azure pipeline and I have an issue where a file with syntax errors can be deployed
d
assuming outside of devOps context, the CLI cmd allows to upload successfully even if JS is invalid? if so, not sure if there is much you can do with that then I would suggest using ESLint or some equivalent to pick up on these kind of syntax errors
s
You could also probably run TypeScript against the JS code, but @dbarnett’s idea is probably what I'd recommend first.
d
yah I did a proof of concept with tsc and pure JS there is a
noEmit
flag (+checkJs, allowJs, etc.)(https://www.typescriptlang.org/tsconfig/#noEmit) that seemed could be leveraged successfully for this purpose, or moreso doing some type-checking validation on JS project as well in my case but I assume eslint probably just much easier to get going, and would provide some additional value of linting if is not in use in dev/ci already