2

Usually certain Grunt tasks have the option to "fail on warning", making it possible to put it as a step in your build process.

I am looking at JSBeautifier but it seems like there is no option.

Any suggestions on how we can make our build fail, if a JavaScript file gets formatted by JSBeautifier a build step?

corgrath
  • 11,673
  • 15
  • 68
  • 99

1 Answers1

2

If mode is "VERIFY_ONLY", then task will fail if at least one file can be beautified. This is useful for pre-commit check.

https://www.npmjs.com/package/grunt-jsbeautifier#options-mode-optional

Awan
  • 159
  • 1
  • 10