(this answer is via @jzsfkzm, which kindly posted a great answer on github but didn’t decide to cancel the answer here.)
In our projects, the plugin is added to plugins.sbt and configured in Build.scala. Examples are below.
Project /plugins.sbt
addSbtPlugin("com.github.philcali" % "sbt-jslint" % "0.1.3")
Project /Build.scala
import sbtjslint.Plugin._ import sbtjslint.Plugin.LintKeys._ ... val localSettings = lintSettings ++ inConfig(Compile)(Seq( // jslint sourceDirectory in jslint <<= (baseDirectory)(_ / "public" / "javascripts"), excludeFilter in jslint := "generated" || "lib", flags in jslint := Seq("sloppy", "continue", "vars", "nomen") )) def playProject = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings( localSettings : _* )
The task we use to run jslint is play jslint , it will check your code and create an xml file, target / jslint / results.xml for future use. You can use it in the Jenkins Violations plugin, for example.
ms-tg source share