Skip to content

Commit

Permalink
WW-4532 Javascript generated by s:doubleselect has global variables t…
Browse files Browse the repository at this point in the history
…hat can interfer with the rest of the app

- Introduce new build plugin to automatically execute jslint checks during build on javascript resources
  • Loading branch information
jogep committed Aug 4, 2015
1 parent 5cf0671 commit 49c43b3
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
23 changes: 23 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
13 changes: 13 additions & 0 deletions core/src/main/resources/jshint.conf.js
Original file line number Diff line number Diff line change
@@ -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": {}
}

0 comments on commit 49c43b3

Please sign in to comment.