Repository: struts Updated Branches: refs/heads/master 9e0aa504e -> 5cf3381b8
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 Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/49c43b37 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/49c43b37 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/49c43b37 Branch: refs/heads/master Commit: 49c43b377e9f7de91dc474a6d191775126084343 Parents: 5cf0671 Author: Johannes Geppert <jo...@apache.org> Authored: Tue Aug 4 22:00:16 2015 +0200 Committer: Johannes Geppert <jo...@apache.org> Committed: Tue Aug 4 22:00:16 2015 +0200 ---------------------------------------------------------------------- core/pom.xml | 23 +++++++++++++++++++++++ core/src/main/resources/jshint.conf.js | 13 +++++++++++++ 2 files changed, 36 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/49c43b37/core/pom.xml ---------------------------------------------------------------------- diff --git a/core/pom.xml b/core/pom.xml index e3644db..b5088f7 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -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> http://git-wip-us.apache.org/repos/asf/struts/blob/49c43b37/core/src/main/resources/jshint.conf.js ---------------------------------------------------------------------- diff --git a/core/src/main/resources/jshint.conf.js b/core/src/main/resources/jshint.conf.js new file mode 100644 index 0000000..350b03a --- /dev/null +++ b/core/src/main/resources/jshint.conf.js @@ -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": {} +} \ No newline at end of file