WW-4532 Javascript generated by s:doubleselect has global variables that can interfer with the rest of the app

- Introduce new build plugin to automatically execute jslint checks during build on javascript resources
This commit is contained in:
Johannes Geppert
2015-08-04 22:00:16 +02:00
parent 5cf0671b60
commit 49c43b377e
2 changed files with 36 additions and 0 deletions
+23
View File
@@ -106,6 +106,29 @@
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>com.cj.jshintmojo</groupId>
<artifactId>jshint-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>lint</goal>
</goals>
</execution>
</executions>
<configuration>
<configFile>src/main/resources/jshint.conf.js</configFile>
<directories>
<directory>src/main/resources/</directory>
</directories>
<excludes>
<exclude>src/main/resources/org/apache/struts2/static/domTT.js</exclude>
</excludes>
<reporter>jslint</reporter>
<reportFile>target/jshint.xml</reportFile>
<failOnError>true</failOnError>
</configuration>
</plugin>
</plugins>
</build>
+13
View File
@@ -0,0 +1,13 @@
{
"maxparams": 5,
"indent": true,
"camelcase": true,
"eqeqeq": true,
"forin": true,
"immed": true,
"latedef": false,
"noarg": true,
"noempty": true,
"nonew": true,
"globals": {}
}