Vettig Maven JSLint-plugin

Äntligen en ordentlig maven-plugin som kör jslint på javascript-koden. Version 2.0.2 har bättre dokumentation än 2.0.1. Här är en snippet från en pom:

<project ...>
	<build>
		<plugins>
			<plugin>
				<groupid>com.googlecode.jslint4java</groupid>
				<artifactid>jslint4java-maven-plugin</artifactid>
				<version>2.0.2</version>
				<executions>
					<execution>
						<id>lint</id>
						<phase>compile</phase>
						<goals>
							<goal>lint</goal>
						</goals>
						<configuration>
							<sourcefolders>
								<sourcefolder>${basedir}/src/main/webapp/js</sourcefolder>
							</sourcefolders>
							<failonerror>true</failonerror>
							<options>
								<browser>true</browser>
								<forin>true</forin>
								<fragment>true</fragment>
								<undef>true</undef>
								<nomen>true</nomen>
								<plusplus>true</plusplus>
								<predef>Ext,jQuery</predef>
								<sloppy>true</sloppy>
								<vars>true</vars>
								<white>true</white>
							</options>
						</configuration>
					</execution>
				</executions>
			</plugin>
</plugins></build></project>

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>