Does someone have JSHint plugin documentation or example configuration?

I am looking to establish good programming practices on my development team through using JSHint and noticed that there are various indications of JSHint potentially being supported in Gradle.

  1. We have http://gradle.1045684.n5.nabble.com/State-of-javascript-stuff-in-master-td5709818.html which indicates stuff was being worked on 2. http://www.gradle.org/docs/current/javadoc/org/gradle/plugins/javascript/jshint/JsHint.html is the api documentation on the plugin

Based on the User Guide’s lack of details, I’m guessing this isn’t supported yet, but I’m wondering if someone has an example of a basic task that executes this plugin? I have tried to execute it myself and not yet been successful. I am particularly interested as the version of JSHint used looks like it takes advantage of Rhino, which would save me from having to install node.js in windows/linux or use the windows scripting host version of JSHint.

I have tired to implement this assuming it might be similar to the JSDoc plugin. I have at least included:

apply plugin: 'jshint'

And that seems to work without throwing an exception.

When it comes time to make an actual task, I’m coming up short though. If somone can even point me to another appropriate plugin to copy the style from (i.e. JSDoc?) or supply a basic concept of how the task should be configured I’d be happy to investigate on my own and post a followup that might be useful to others.

Thanks

1 Like

Hi Todd,

The ‘JSHint’ support in the core is not yet public or documented. I recommend using https://github.com/eriwen/gradle-js-plugin in the meantime.