mirror of
https://github.com/apache/struts.git
synced 2026-08-05 22:56:59 +00:00
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:
@@ -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>
|
||||
|
||||
|
||||
@@ -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": {}
|
||||
}
|
||||
Reference in New Issue
Block a user