From 49c43b377e9f7de91dc474a6d191775126084343 Mon Sep 17 00:00:00 2001 From: Johannes Geppert Date: Tue, 4 Aug 2015 22:00:16 +0200 Subject: [PATCH] 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 --- core/pom.xml | 23 +++++++++++++++++++++++ core/src/main/resources/jshint.conf.js | 13 +++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 core/src/main/resources/jshint.conf.js diff --git a/core/pom.xml b/core/pom.xml index e3644db87..b5088f740 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -106,6 +106,29 @@ + + com.cj.jshintmojo + jshint-maven-plugin + + + + lint + + + + + src/main/resources/jshint.conf.js + + src/main/resources/ + + + src/main/resources/org/apache/struts2/static/domTT.js + + jslint + target/jshint.xml + true + + diff --git a/core/src/main/resources/jshint.conf.js b/core/src/main/resources/jshint.conf.js new file mode 100644 index 000000000..350b03a4a --- /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