This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I'm using a paid version of 3.2.xx, and when I set it to minify my javascript, I get the following error each time I save my javascript file: JSHint: Expected an assignment or function call and instead saw an expression. This happens when I write self-invoking functions in the following syntax:
I realize this syntax is less common than the usual (function(){})(); But it's still completely valid JS. Since the error is being generated by JSHint, I assume it's not really a bug within Web Workbench, but it's still annoying to get that error each time I save my file. So, is it possible to suppress only certain error messages in JSHint? I'd still like to see other suggestions/errors, so I'd rather not turn it off entirely, but if that's my only option, is that possible? |
|
|
No unfortunately not currently, we are looking at updating to a different approach for handling JSHint and at the same time we will be updating to the current version which does include fine grained control for ignoring warnings via comments in your code however for now your only option would be to run JSHint independantly from WW (e.g. install it via node) seperately and disable it in WW by setting the "JavaScript" setting under the Static Analysis section of Tools/Options/Web Workbench to False. The option you would be looking for then would be:
See http://www.jshint.com/docs/config/ for more detail about this and the other options in JSHint. AFAIK all of the standard options are all supported in the version we currently use but for some reason the warning ignore option doesnt seem to be..
|
|