allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hei...@apache.org
Subject [46/50] allura git commit: [#8035] ESLINT FIX: no-unused-var (allow unused function params)
Date Wed, 27 Jan 2016 20:23:00 GMT
[#8035] ESLINT FIX: no-unused-var  (allow unused function params)


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/d474150f
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/d474150f
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/d474150f

Branch: refs/heads/hs/8035
Commit: d474150f4b79614757985dea5bc514eb5c52a5a9
Parents: b4f0ae4
Author: Heith Seewald <heiths@gmail.com>
Authored: Tue Jan 26 14:09:18 2016 -0500
Committer: Heith Seewald <heiths@gmail.com>
Committed: Wed Jan 27 15:21:32 2016 -0500

----------------------------------------------------------------------
 .eslintrc-es6                                  | 10 +++-
 Allura/allura/public/nf/js/context-menu.es6.js | 20 ++++----
 Allura/allura/public/nf/js/navbar.es6.js       |  6 +--
 Allura/allura/public/nf/js/tooltip.es6.js      | 54 ++++++++++-----------
 4 files changed, 46 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/d474150f/.eslintrc-es6
----------------------------------------------------------------------
diff --git a/.eslintrc-es6 b/.eslintrc-es6
index 455b95a..b91ed8f 100644
--- a/.eslintrc-es6
+++ b/.eslintrc-es6
@@ -11,6 +11,10 @@
         "ClassDeclaration": false
       }
     }],
+    "no-unused-vars": [2, {
+      "vars": "local",
+      "args": "none"
+    }],
     "no-inline-comments": 0,
     "comma-dangle": 0
   },
@@ -22,15 +26,19 @@
     "_": true,
     "ReactReorderable": true
   },
-  "parser": "babel-eslint",
   "env": {
     "es6": true,
+    "jquery": true,
     "browser": true
   },
   "extends": "google",
   "ecmaFeatures": {
     "jsx": true,
     "forOf": true,
+    "blockBindings": true,
+    "arrowFunctions": true,
+    "classes": true,
+    "defaultParams": true,
     "experimentalObjectRestSpread": true
   },
   "plugins": [

http://git-wip-us.apache.org/repos/asf/allura/blob/d474150f/Allura/allura/public/nf/js/context-menu.es6.js
----------------------------------------------------------------------
diff --git a/Allura/allura/public/nf/js/context-menu.es6.js b/Allura/allura/public/nf/js/context-menu.es6.js
index 4c2958d..c03d699 100644
--- a/Allura/allura/public/nf/js/context-menu.es6.js
+++ b/Allura/allura/public/nf/js/context-menu.es6.js
@@ -24,16 +24,6 @@ class ContextMenu extends React.Component {
         super(props);
     }
 
-    static propTypes = {
-        classes: React.PropTypes.array,
-        items: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
-        onOptionClick: React.PropTypes.func.isRequired
-    };
-
-    static defaultProps = {
-        classes: []
-    };
-
     componentWillMount() {
         let _this = this;
         var mount_point;
@@ -78,4 +68,12 @@ class ContextMenu extends React.Component {
     }
 }
 
-module.exports(ContextMenu);
+ContextMenu.propTypes = {
+    classes: React.PropTypes.array,
+    items: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
+    onOptionClick: React.PropTypes.func.isRequired
+};
+
+ContextMenu.defaultProps = {
+    classes: []
+};

http://git-wip-us.apache.org/repos/asf/allura/blob/d474150f/Allura/allura/public/nf/js/navbar.es6.js
----------------------------------------------------------------------
diff --git a/Allura/allura/public/nf/js/navbar.es6.js b/Allura/allura/public/nf/js/navbar.es6.js
index f82ee97..d027602 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -17,13 +17,13 @@
        under the License.
 */
 /* eslint camelcase: 0 */
-/* exported Main */
+/* eslint no-unused-vars: [2, {"args": "none", "varsIgnorePattern": "Main"}] */
 'use strict';
 
 /**
 * Gets the current project url.
 * @param {boolean} rest - Return a "rest" version of the url.
-* @returns {string} - Project Url
+* @return {string} - Project Url
 */
 var _getProjectUrl = function(rest = true) {
     var nbhd;
@@ -584,5 +584,3 @@ var Main = React.createClass({
         );
     }
 });
-
-module.exports(Main);

http://git-wip-us.apache.org/repos/asf/allura/blob/d474150f/Allura/allura/public/nf/js/tooltip.es6.js
----------------------------------------------------------------------
diff --git a/Allura/allura/public/nf/js/tooltip.es6.js b/Allura/allura/public/nf/js/tooltip.es6.js
index f24fc16..b76a15c 100644
--- a/Allura/allura/public/nf/js/tooltip.es6.js
+++ b/Allura/allura/public/nf/js/tooltip.es6.js
@@ -16,8 +16,8 @@
        specific language governing permissions and limitations
        under the License.
 */
-'use strict';
 
+/* exported ToolTip */
 /**
  * React Tooltip (tooltipster) Base class
 
@@ -28,32 +28,6 @@ class ToolTip extends React.Component {
         super(props);
     }
 
-    static propTypes = {
-        targetSelector: React.PropTypes.string.isRequired,
-        animation: React.PropTypes.string,
-        speed: React.PropTypes.number,
-        position: React.PropTypes.string,
-        contentAsHTML: React.PropTypes.bool,
-        delay: React.PropTypes.number,
-        theme: React.PropTypes.string,
-        maxWidth: React.PropTypes.number,
-        trigger: React.PropTypes.string,
-        multiple: React.PropTypes.bool,
-    };
-
-    static defaultProps = {
-        animation: 'fade',
-        speed: 150,
-        delay: 0,
-        maxWidth: 300,
-        multiple: true,
-        contentAsHTML: false,
-        position: 'left',
-        trigger: 'hover',
-        classes: [],
-        theme: 'tooltipster-light'
-    };
-
     componentDidMount() {
         var _this = this;
         $(this.props.targetSelector).tooltipster({
@@ -75,5 +49,29 @@ class ToolTip extends React.Component {
     }
 }
 
-module.exports(ToolTip);
+ToolTip.propTypes = {
+    targetSelector: React.PropTypes.string.isRequired,
+    animation: React.PropTypes.string,
+    speed: React.PropTypes.number,
+    position: React.PropTypes.string,
+    contentAsHTML: React.PropTypes.bool,
+    delay: React.PropTypes.number,
+    theme: React.PropTypes.string,
+    maxWidth: React.PropTypes.number,
+    trigger: React.PropTypes.string,
+    multiple: React.PropTypes.bool,
+};
+
+ToolTip.defaultProps = {
+    animation: 'fade',
+    speed: 150,
+    delay: 0,
+    maxWidth: 300,
+    multiple: true,
+    contentAsHTML: false,
+    position: 'left',
+    trigger: 'hover',
+    classes: [],
+    theme: 'tooltipster-light'
+};
 


Mime
View raw message