You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by he...@apache.org on 2016/01/26 20:11:32 UTC

[01/24] allura git commit: [#8042] ticket:888 Add try/finally constructions into Repo.merge [Forced Update!]

Repository: allura
Updated Branches:
  refs/heads/hs/8035 e0a565d02 -> fd46b7965 (forced update)


[#8042] ticket:888 Add try/finally constructions into Repo.merge


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

Branch: refs/heads/hs/8035
Commit: 2dd2ff0811b8e9842ab1091166169b2f1a43e2f3
Parents: 35f84fc
Author: Denis Kotov <de...@gmail.com>
Authored: Fri Jan 22 02:48:19 2016 +0200
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Jan 22 16:00:28 2016 -0500

----------------------------------------------------------------------
 ForgeGit/forgegit/model/git_repo.py             | 40 ++++++++++----------
 .../forgegit/tests/model/test_repository.py     | 10 +++++
 2 files changed, 31 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/2dd2ff08/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index 51d300e..7c1bb38 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -117,25 +117,27 @@ class Repository(M.Repository):
         g = self._impl._git.git
         # can't merge in bare repo, so need to clone
         tmp_path = tempfile.mkdtemp()
-        tmp_repo = git.Repo.clone_from(
-            self.full_fs_path,
-            to_path=tmp_path,
-            bare=False)
-        tmp_repo = GitImplementation(Object(full_fs_path=tmp_path))._git
-        tmp_repo.git.fetch('origin', mr.target_branch)
-        tmp_repo.git.checkout(mr.target_branch)
-        tmp_repo.git.fetch(mr.downstream_repo.full_fs_path, mr.source_branch)
-        author = h.really_unicode(c.user.display_name or c.user.username)
-        tmp_repo.git.config('user.name', author)
-        tmp_repo.git.config('user.email', '')
-        msg = u'Merge {} branch {} into {}\n\n{}'.format(
-            mr.downstream_repo.url(),
-            mr.source_branch,
-            mr.target_branch,
-            h.absurl(mr.url()))
-        tmp_repo.git.merge(mr.downstream.commit_id, '-m', msg)
-        tmp_repo.git.push('origin', mr.target_branch)
-        shutil.rmtree(tmp_path, ignore_errors=True)
+        try:
+            tmp_repo = git.Repo.clone_from(
+                self.full_fs_path,
+                to_path=tmp_path,
+                bare=False)
+            tmp_repo = GitImplementation(Object(full_fs_path=tmp_path))._git
+            tmp_repo.git.fetch('origin', mr.target_branch)
+            tmp_repo.git.checkout(mr.target_branch)
+            tmp_repo.git.fetch(mr.downstream_repo.full_fs_path, mr.source_branch)
+            author = h.really_unicode(c.user.display_name or c.user.username)
+            tmp_repo.git.config('user.name', author)
+            tmp_repo.git.config('user.email', '')
+            msg = u'Merge {} branch {} into {}\n\n{}'.format(
+                mr.downstream_repo.url(),
+                mr.source_branch,
+                mr.target_branch,
+                h.absurl(mr.url()))
+            tmp_repo.git.merge(mr.downstream.commit_id, '-m', msg)
+            tmp_repo.git.push('origin', mr.target_branch)
+        finally:
+            shutil.rmtree(tmp_path, ignore_errors=True)
 
     def rev_to_commit_id(self, rev):
         return self._impl.rev_parse(rev).hexsha

http://git-wip-us.apache.org/repos/asf/allura/blob/2dd2ff08/ForgeGit/forgegit/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index 2f04bbb..7e9ec4b 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -650,6 +650,16 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
             tempfile.mkdtemp.return_value,
             ignore_errors=True)
 
+    @mock.patch('forgegit.model.git_repo.tempfile')
+    @mock.patch('forgegit.model.git_repo.shutil')
+    @mock.patch('forgegit.model.git_repo.git')
+    def test_merge_raise_exception(self, git, shutil, tempfile):
+        self.repo._impl._git.git = mock.Mock()
+        git.Repo.clone_from.side_effect = Exception
+        with self.assertRaises(Exception):
+            self.repo.merge(mock.Mock())
+        shutil.rmtree.assert_has_calles()
+
     @mock.patch.dict('allura.lib.app_globals.config',  {'scm.commit.git.detect_copies': 'false'})
     @td.with_tool('test', 'Git', 'src-weird', 'Git', type='git')
     def test_paged_diffs(self):


[06/24] allura git commit: [#8035] Update eslintrc to include plugins

Posted by he...@apache.org.
[#8035] Update eslintrc to include plugins


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

Branch: refs/heads/hs/8035
Commit: dc0593400074f26b0e4efcc135f02cf54a48a922
Parents: 5c21c3b
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 15:45:44 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:02 2016 -0500

----------------------------------------------------------------------
 .eslintrc | 51 +++++++++++++++++++--------------------------------
 1 file changed, 19 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/dc059340/.eslintrc
----------------------------------------------------------------------
diff --git a/.eslintrc b/.eslintrc
index 493b774..2ba7869 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,42 +1,29 @@
 {
   "rules": {
-    "indent": [2, 4],
-    "no-unused-vars": [2, {"vars": "all", "args": "none"}],
-    "no-console": 0,
-    "semi": [2, "always"],
-    "eqeqeq": 2,
-    "block-scoped-var": 2,
-    "consistent-return": 2,
-    // specify curly brace conventions for all control statements
-    "curly": [2, "all"],
-    // require default case in switch statements
-    "default-case": 2,
-    // disallow use of eval()
-    "no-eval": 2,
-    // disallow adding to native types
-    "no-extend-native": 2,
-    // disallow use of eval()-like methods
-    "no-implied-eval": 2,
-    // disallow this keywords outside of classes or class-like objects
-    "no-invalid-this": 2,
-    // disallow creation of functions within loops
-    "no-loop-func": 2,
-    // disallow declaring the same variable more then once
-    "no-redeclare": 2,
-    // disallow use of the with statement
-    "no-with": 2,
-    // require use of the second argument for parseInt()
-    "radix": 2
+    "indent": [
+      2,
+      4
+    ]
   },
   "globals": {
-
+    "ReactDOM": true,
+    "$": true,
+    "window": true,
+    "_": true,
+    "ReactReorderable": true
   },
-  "parser": "esprima-fb",
+  "parser": "babel-eslint",
   "env": {
-    "browser": true,
-    "jquery": true
+    "es6": true,
+    "browser": true
+  },
+  "extends": "google",
+  "ecmaFeatures": {
+    "jsx": true,
+    "forOf": true,
+    "experimentalObjectRestSpread": true
   },
-  "extends": "eslint:recommended",
   "plugins": [
+    "react"
   ]
 }
\ No newline at end of file


[05/24] allura git commit: [#8035] ESLINT FIX: max-len

Posted by he...@apache.org.
[#8035] ESLINT FIX: max-len


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

Branch: refs/heads/hs/8035
Commit: 3be51b218fad651054ffa8ce708e3e83d272c891
Parents: 4a703cf
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 17:37:38 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:02 2016 -0500

----------------------------------------------------------------------
 .eslintrc                                |  6 ++----
 Allura/allura/public/nf/js/navbar.es6.js | 17 ++++++++++++++---
 2 files changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/3be51b21/.eslintrc
----------------------------------------------------------------------
diff --git a/.eslintrc b/.eslintrc
index f3fb796..a66f2fa 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,9 +1,7 @@
 {
   "rules": {
-    "indent": [
-      2,
-      4
-    ]
+    "max-len": [1, 119, 4],
+    "indent": [2, 4]
   },
   "globals": {
     "ReactDOM": true,

http://git-wip-us.apache.org/repos/asf/allura/blob/3be51b21/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 ed8aa6d..b1a0eb3 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -142,7 +142,11 @@ var GroupingThreshold = React.createClass({
               <label htmlFor='threshold-input'>Grouping Threshold</label>
                 <ToolTip targetSelector="#threshold-input" position="top" contentAsHTML={true}/>
                 <input type='number' name='threshold-input' id="threshold-input"
-                       title='When you have multiple tools of the same type, <u>this number</u> determines if they will fit in the navigation bar or be grouped into a dropdown.'
+
+                       title='When you have multiple tools of the same type,\
+                             <u>this number</u> determines if they will fit in the navigation \
+                             bar or be grouped into a dropdown.'
+
                        value={ this.state.value }
                        onChange={ this.handleChange }
                        min='1' max='50'/>
@@ -317,8 +321,15 @@ var AdminNav = React.createClass({
                 options={ item.admin_options }
             />;
             if (subMenu) {
-                childOptionsOpen = _.contains(_.pluck(item.children, 'mount_point'), this.props.currentOptionMenu.tool);
-                tool_list.push(<NavBarItemWithSubMenu key={_.uniqueId()} tool={core_item} subMenu={subMenu} childOptionsOpen={childOptionsOpen}/>);
+                childOptionsOpen = _.contains(_.pluck(item.children, 'mount_point'),
+                    this.props.currentOptionMenu.tool);
+
+                tool_list.push(<NavBarItemWithSubMenu
+                    key={_.uniqueId()}
+                    tool={core_item}
+                    subMenu={subMenu}
+                    childOptionsOpen={childOptionsOpen}
+                />);
             } else {
                 tool_list.push(core_item);
             }


[23/24] allura git commit: [#8035] ESLINT FIX: no-unused-var (allow unused function params)

Posted by he...@apache.org.
[#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/e828e51a
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/e828e51a
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/e828e51a

Branch: refs/heads/hs/8035
Commit: e828e51a5b03e781272638dcbe3d6744664d8278
Parents: fed5f1c
Author: Heith Seewald <he...@gmail.com>
Authored: Tue Jan 26 14:09:18 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:06 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/e828e51a/.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/e828e51a/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/e828e51a/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/e828e51a/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'
+};
 


[24/24] allura git commit: [#8035] Remove unused .eslintrc

Posted by he...@apache.org.
[#8035] Remove unused .eslintrc


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

Branch: refs/heads/hs/8035
Commit: fd46b7965d8982abbd82e74377bde008d1d8109b
Parents: e828e51
Author: Heith Seewald <he...@gmail.com>
Authored: Tue Jan 26 14:10:23 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:06 2016 -0500

----------------------------------------------------------------------
 .eslintrc | 39 ---------------------------------------
 1 file changed, 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/fd46b796/.eslintrc
----------------------------------------------------------------------
diff --git a/.eslintrc b/.eslintrc
deleted file mode 100644
index 455b95a..0000000
--- a/.eslintrc
+++ /dev/null
@@ -1,39 +0,0 @@
-{
-  "rules": {
-    "max-len": [1, 119, 4],
-    "indent": [2, 4],
-    "jsx-quotes": [0],
-    "quotes": [0],
-    "operator-linebreak": [2, "before", { "overrides": { "?": "after", "&&": "after" } }],
-    "require-jsdoc": [2, {"require": {
-        "FunctionDeclaration": true,
-        "MethodDefinition": false,
-        "ClassDeclaration": false
-      }
-    }],
-    "no-inline-comments": 0,
-    "comma-dangle": 0
-  },
-  "globals": {
-    "ReactDOM": true,
-    "React": true,
-    "$": true,
-    "window": true,
-    "_": true,
-    "ReactReorderable": true
-  },
-  "parser": "babel-eslint",
-  "env": {
-    "es6": true,
-    "browser": true
-  },
-  "extends": "google",
-  "ecmaFeatures": {
-    "jsx": true,
-    "forOf": true,
-    "experimentalObjectRestSpread": true
-  },
-  "plugins": [
-    "react"
-  ]
-}
\ No newline at end of file


[19/24] allura git commit: [#8035] ESLINT FIX: no-implicit-coercion

Posted by he...@apache.org.
[#8035] ESLINT FIX: no-implicit-coercion


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

Branch: refs/heads/hs/8035
Commit: abb5144a81b146098131e7ae101742f047e3329d
Parents: 80f46bd
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 19:32:34 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:05 2016 -0500

----------------------------------------------------------------------
 Allura/allura/public/nf/js/navbar.es6.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/abb5144a/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 d83f1f0..23f9313 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -139,7 +139,7 @@ var GroupingThreshold = React.createClass({
     render: function() {
         return (
             <div>
-                { !!this.props.isHidden &&
+                { !Boolean(this.props.isHidden) &&
                 <div id='threshold-config'>
             <span>
               <label htmlFor='threshold-input'>Grouping Threshold</label>


[08/24] allura git commit: [#8035] ESLINT FIX: space-before-function-paren

Posted by he...@apache.org.
[#8035] ESLINT FIX: space-before-function-paren


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

Branch: refs/heads/hs/8035
Commit: b0d87971c0206a8939c184df2707ced0f324e3ba
Parents: 74a25be
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 18:21:09 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:03 2016 -0500

----------------------------------------------------------------------
 Allura/allura/public/nf/js/context-menu.es6.js |  4 ++--
 Allura/allura/public/nf/js/navbar.es6.js       | 14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/b0d87971/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 710387d..58d213d 100644
--- a/Allura/allura/public/nf/js/context-menu.es6.js
+++ b/Allura/allura/public/nf/js/context-menu.es6.js
@@ -38,7 +38,7 @@ class ContextMenu extends React.Component {
     componentWillMount() {
         let _this = this;
         var mount_point;
-        $('body').on('click.contextMenu', function (evt) {
+        $('body').on('click.contextMenu', function(evt) {
             /* the :not filter should've worked as a 2nd param to .on() instead of this,
              but clicks in the page gutter were being delayed for some reason */
             if ($(evt.target).is(':not(.contextMenu)')) {
@@ -67,7 +67,7 @@ class ContextMenu extends React.Component {
             <div className="contextMenu">
                 <ToolTip targetSelector='#top_nav_admin .contextMenu a'/>
                 <ul>{
-                    this.props.items.map(function (o, i) {
+                    this.props.items.map(function(o, i) {
                         return (<li key={i}>
                             <a href={o.href}
                                className={_this.props.classes.concat([o.className]).join(' ')}

http://git-wip-us.apache.org/repos/asf/allura/blob/b0d87971/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 0ea3cb5..1055d43 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -209,7 +209,7 @@ var ToggleAddNewTool = React.createClass({
             visible: !this.state.visible
         });
     },
-    render: function () {
+    render: function() {
         return (
             <div>
                 <a onClick={ this.handleToggle } className="add-tool-toggle">
@@ -286,7 +286,7 @@ var AdminNav = React.createClass({
         onOptionClick: React.PropTypes.func.isRequired
     },
 
-    buildMenu: function (items, isSubMenu=false) {
+    buildMenu: function(items, isSubMenu=false) {
         var _this = this;
         var [tools, anchoredTools, endTools] = [[], [], []];
         var subMenu;
@@ -358,14 +358,14 @@ var AdminNav = React.createClass({
         );
     },
 
-    render: function () {
+    render: function() {
         var tools = this.buildMenu(this.props.tools);
         return <div>{tools}</div>;
     }
 });
 
 var NavBarItemWithSubMenu = React.createClass({
-    render: function () {
+    render: function() {
         return (
             <div className={"tb-item-container" + (this.props.childOptionsOpen ? " child-options-open" : "")}>
                 { this.props.tool }
@@ -385,7 +385,7 @@ var NavBarItemWithSubMenu = React.createClass({
  * @constructor
  */
 var AdminItemGroup = React.createClass({
-    render: function () {
+    render: function() {
         return (
             <div className="tb-item-grouper">
                 {this.props.children}
@@ -459,7 +459,7 @@ var Main = React.createClass({
         });
     },
 
-    handleShowOptionMenu: function (mount_point) {
+    handleShowOptionMenu: function(mount_point) {
         this.setState({
             currentOptionMenu: {
                 tool: mount_point
@@ -504,7 +504,7 @@ var Main = React.createClass({
             type: 'POST',
             url: url,
             data: params,
-            success: function () {
+            success: function() {
                 $('#messages').notify('Tool order updated',
                     {
                         status: 'confirm',


[14/24] allura git commit: [#8035] ESLINT FIX: no-multiple-empty-lines

Posted by he...@apache.org.
[#8035] ESLINT FIX: no-multiple-empty-lines


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

Branch: refs/heads/hs/8035
Commit: 9f7932f1800bfea721bd982350f5fd8633ed8edc
Parents: 19ff557
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 18:35:56 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:04 2016 -0500

----------------------------------------------------------------------
 Allura/allura/public/nf/js/context-menu.es6.js | 1 -
 Allura/allura/public/nf/js/navbar.es6.js       | 1 -
 Allura/allura/public/nf/js/tooltip.es6.js      | 1 -
 3 files changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/9f7932f1/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 58d213d..ec5b68d 100644
--- a/Allura/allura/public/nf/js/context-menu.es6.js
+++ b/Allura/allura/public/nf/js/context-menu.es6.js
@@ -19,7 +19,6 @@
 /* eslint camelcase: 0 */
 'use strict';
 
-
 class ContextMenu extends React.Component {
     constructor(props) {
         super(props);

http://git-wip-us.apache.org/repos/asf/allura/blob/9f7932f1/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 a7266ae..585d004 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -379,7 +379,6 @@ var NavBarItemWithSubMenu = React.createClass({
     }
 });
 
-
 /**
  * The NavBar when in "Admin" mode.
  * @constructor

http://git-wip-us.apache.org/repos/asf/allura/blob/9f7932f1/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 87a865d..95f7188 100644
--- a/Allura/allura/public/nf/js/tooltip.es6.js
+++ b/Allura/allura/public/nf/js/tooltip.es6.js
@@ -54,7 +54,6 @@ class ToolTip extends React.Component {
         theme: 'tooltipster-light'
     };
 
-
     componentDidMount() {
         var _this = this;
         $(this.props.targetSelector).tooltipster({


[20/24] allura git commit: [#8035] ESLINT FIX: radix

Posted by he...@apache.org.
[#8035] ESLINT FIX: radix


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

Branch: refs/heads/hs/8035
Commit: 6fdf6f96ff3f31152c6160d841f7c99936bdd96b
Parents: 151a3ea
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 19:56:18 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:05 2016 -0500

----------------------------------------------------------------------
 Allura/allura/public/nf/js/navbar.es6.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/6fdf6f96/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 ffaa371..f82ee97 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -575,7 +575,7 @@ var Main = React.createClass({
                     <GroupingThreshold
                         onUpdateThreshold={ this.onUpdateThreshold }
                         isHidden={ this.state.visible }
-                        initialValue={ parseInt(this.state.data.grouping_threshold) }/> }
+                        initialValue={ parseInt(this.state.data.grouping_threshold, 10) }/> }
                 </div>
                 <ToggleAdminButton
                     handleButtonPush={ this.handleToggleAdmin }


[09/24] allura git commit: [#8035] ESLINT FIX: operator-linebreak

Posted by he...@apache.org.
[#8035] ESLINT FIX: operator-linebreak


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

Branch: refs/heads/hs/8035
Commit: f17729fe54cb84bc316e11027d841cc8639fb0ac
Parents: b0d8797
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 18:33:22 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:03 2016 -0500

----------------------------------------------------------------------
 .eslintrc                                |  3 ++-
 Allura/allura/public/nf/js/navbar.es6.js | 12 ++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/f17729fe/.eslintrc
----------------------------------------------------------------------
diff --git a/.eslintrc b/.eslintrc
index b42eb66..ff25e9d 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -3,7 +3,8 @@
     "max-len": [1, 119, 4],
     "indent": [2, 4],
     "jsx-quotes": [0],
-    "quotes": [0]
+    "quotes": [0],
+    "operator-linebreak": [2, "before", { "overrides": { "?": "after", "&&": "after" } }]
   },
   "globals": {
     "ReactDOM": true,

http://git-wip-us.apache.org/repos/asf/allura/blob/f17729fe/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 1055d43..818bb3e 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -98,13 +98,13 @@ var NavBarItem = React.createClass({
                         {this.props.name}
                     </span>
                 </a>
-                {this.props.currentOptionMenu.tool
-                && this.props.currentOptionMenu.tool === this.props.mount_point
-                && <ContextMenu
+                {this.props.currentOptionMenu.tool &&
+                this.props.currentOptionMenu.tool === this.props.mount_point &&
+                <ContextMenu
                     {...this.props}
-                        items={this.props.options}
-                        onOptionClick={this.props.onOptionClick}
-                    /> }
+                    items={this.props.options}
+                    onOptionClick={this.props.onOptionClick}
+                /> }
             </div>
         );
     },


[12/24] allura git commit: [#8035] ESLINT FIX: one-var

Posted by he...@apache.org.
[#8035] ESLINT FIX: one-var


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

Branch: refs/heads/hs/8035
Commit: d0284961588d969d1f9eb11a7beafa703d110453
Parents: 79c4a47
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 18:12:23 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:03 2016 -0500

----------------------------------------------------------------------
 Allura/allura/public/nf/js/navbar.es6.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/d0284961/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 ee356a4..4570872 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -27,7 +27,9 @@
  * @returns {string}
  */
 function _getProjectUrl(rest = true) {
-    var nbhd, proj, nbhd_proj;
+    var nbhd;
+    var proj;
+    var nbhd_proj;
     var ident_classes = document.getElementById('page-body').className.split(' ');
     for (var cls of ident_classes) {
         if (cls.indexOf('project-') === 0) {
@@ -287,7 +289,8 @@ var AdminNav = React.createClass({
     buildMenu: function (items, isSubMenu=false) {
         var _this = this;
         var [tools, anchoredTools, endTools] = [[], [], []];
-        var subMenu, childOptionsOpen;
+        var subMenu;
+        var childOptionsOpen;
 
         for (let item of items) {
             if (item.children) {
@@ -297,8 +300,8 @@ var AdminNav = React.createClass({
             }
 
             var _handle = isSubMenu ? "draggable-handle-sub" : 'draggable-handle';
-
-            var toolList, isAnchored;
+            var toolList;
+            var isAnchored;
             if (item.mount_point === 'admin') {
                 // force admin to end, just like 'Project.sitemap()' does
                 toolList = endTools;


[11/24] allura git commit: [#8035] ESLINT FIX: semi

Posted by he...@apache.org.
[#8035] ESLINT FIX: semi


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

Branch: refs/heads/hs/8035
Commit: 74a25beeb8bde6ac1de762d54c55da63174e8c01
Parents: d028496
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 18:16:58 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:03 2016 -0500

----------------------------------------------------------------------
 Allura/allura/public/nf/js/context-menu.es6.js | 4 ++--
 Allura/allura/public/nf/js/navbar.es6.js       | 4 ++--
 Allura/allura/public/nf/js/tooltip.es6.js      | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/74a25bee/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 96ab2e1..710387d 100644
--- a/Allura/allura/public/nf/js/context-menu.es6.js
+++ b/Allura/allura/public/nf/js/context-menu.es6.js
@@ -72,10 +72,10 @@ class ContextMenu extends React.Component {
                             <a href={o.href}
                                className={_this.props.classes.concat([o.className]).join(' ')}
                                title={o.tooltip}>{o.text}</a>
-                        </li>)
+                        </li>);
                     })}
                 </ul>
             </div>
-        )
+        );
     }
 }

http://git-wip-us.apache.org/repos/asf/allura/blob/74a25bee/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 4570872..0ea3cb5 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -223,7 +223,7 @@ var ToggleAddNewTool = React.createClass({
                     items={this.props.installableTools} />
                 }
             </div>
-        )
+        );
     }
 });
 
@@ -563,7 +563,7 @@ var Main = React.createClass({
 
         var max_tool_count = _.chain(this.state.data.menu)
                              .map((item) => {
-                                 return item.children ? _.pluck(item.children, 'tool_name') : item.tool_name
+                                 return item.children ? _.pluck(item.children, 'tool_name') : item.tool_name;
                              })
                              .flatten()
                              .countBy()

http://git-wip-us.apache.org/repos/asf/allura/blob/74a25bee/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 fea6471..87a865d 100644
--- a/Allura/allura/public/nf/js/tooltip.es6.js
+++ b/Allura/allura/public/nf/js/tooltip.es6.js
@@ -68,7 +68,7 @@ class ToolTip extends React.Component {
             multiple: _this.props.multiple,
             iconCloning: false,
             maxWidth: _this.props.maxWidth
-        })
+        });
     }
 
     render() {


[22/24] allura git commit: [#8035] Separate .eslintrc into configs for ES5 and ES6

Posted by he...@apache.org.
[#8035] Separate .eslintrc into configs for ES5 and ES6


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

Branch: refs/heads/hs/8035
Commit: fed5f1cc74d63b159364afc96630c0fed7cc3369
Parents: 6fdf6f9
Author: Heith Seewald <he...@gmail.com>
Authored: Tue Jan 26 11:35:35 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:06 2016 -0500

----------------------------------------------------------------------
 .eslintignore-es5 |  2 ++
 .eslintignore-es6 |  1 +
 .eslintrc-es5     | 42 ++++++++++++++++++++++++++++++++++++++++++
 .eslintrc-es6     | 39 +++++++++++++++++++++++++++++++++++++++
 package.json      |  4 +++-
 5 files changed, 87 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/fed5f1cc/.eslintignore-es5
----------------------------------------------------------------------
diff --git a/.eslintignore-es5 b/.eslintignore-es5
new file mode 100644
index 0000000..8dfa7af
--- /dev/null
+++ b/.eslintignore-es5
@@ -0,0 +1,2 @@
+Allura/allura/public/nf/js/build
+**/*es6.js
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/allura/blob/fed5f1cc/.eslintignore-es6
----------------------------------------------------------------------
diff --git a/.eslintignore-es6 b/.eslintignore-es6
new file mode 100644
index 0000000..ddff5f8
--- /dev/null
+++ b/.eslintignore-es6
@@ -0,0 +1 @@
+Allura/allura/public/nf/js/build

http://git-wip-us.apache.org/repos/asf/allura/blob/fed5f1cc/.eslintrc-es5
----------------------------------------------------------------------
diff --git a/.eslintrc-es5 b/.eslintrc-es5
new file mode 100644
index 0000000..493b774
--- /dev/null
+++ b/.eslintrc-es5
@@ -0,0 +1,42 @@
+{
+  "rules": {
+    "indent": [2, 4],
+    "no-unused-vars": [2, {"vars": "all", "args": "none"}],
+    "no-console": 0,
+    "semi": [2, "always"],
+    "eqeqeq": 2,
+    "block-scoped-var": 2,
+    "consistent-return": 2,
+    // specify curly brace conventions for all control statements
+    "curly": [2, "all"],
+    // require default case in switch statements
+    "default-case": 2,
+    // disallow use of eval()
+    "no-eval": 2,
+    // disallow adding to native types
+    "no-extend-native": 2,
+    // disallow use of eval()-like methods
+    "no-implied-eval": 2,
+    // disallow this keywords outside of classes or class-like objects
+    "no-invalid-this": 2,
+    // disallow creation of functions within loops
+    "no-loop-func": 2,
+    // disallow declaring the same variable more then once
+    "no-redeclare": 2,
+    // disallow use of the with statement
+    "no-with": 2,
+    // require use of the second argument for parseInt()
+    "radix": 2
+  },
+  "globals": {
+
+  },
+  "parser": "esprima-fb",
+  "env": {
+    "browser": true,
+    "jquery": true
+  },
+  "extends": "eslint:recommended",
+  "plugins": [
+  ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/allura/blob/fed5f1cc/.eslintrc-es6
----------------------------------------------------------------------
diff --git a/.eslintrc-es6 b/.eslintrc-es6
new file mode 100644
index 0000000..455b95a
--- /dev/null
+++ b/.eslintrc-es6
@@ -0,0 +1,39 @@
+{
+  "rules": {
+    "max-len": [1, 119, 4],
+    "indent": [2, 4],
+    "jsx-quotes": [0],
+    "quotes": [0],
+    "operator-linebreak": [2, "before", { "overrides": { "?": "after", "&&": "after" } }],
+    "require-jsdoc": [2, {"require": {
+        "FunctionDeclaration": true,
+        "MethodDefinition": false,
+        "ClassDeclaration": false
+      }
+    }],
+    "no-inline-comments": 0,
+    "comma-dangle": 0
+  },
+  "globals": {
+    "ReactDOM": true,
+    "React": true,
+    "$": true,
+    "window": true,
+    "_": true,
+    "ReactReorderable": true
+  },
+  "parser": "babel-eslint",
+  "env": {
+    "es6": true,
+    "browser": true
+  },
+  "extends": "google",
+  "ecmaFeatures": {
+    "jsx": true,
+    "forOf": true,
+    "experimentalObjectRestSpread": true
+  },
+  "plugins": [
+    "react"
+  ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/allura/blob/fed5f1cc/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 1f12ff5..3ae1bc9 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,9 @@
     "watch": "broccoli-timepiece Allura/allura/public/nf/js/build/",
     "env": "env",
     "eslint": "eslint",
-    "lint": "eslint Allura/allura/public/nf/js/*.es6.js || true"
+    "lint-es5": "eslint -c .eslintrc-es5  --ignore-path .eslintignore-es5 Allura/allura/public/**/*.js || true",
+    "lint-es6": "eslint -c .eslintrc-es6  --ignore-path .eslintignore-es6 Allura/allura/public/**/*.es6.js || true",
+    "lint": "npm run lint-es5 && npm run lint-es6"
   },
   "repository": {
     "type": "git",


[21/24] allura git commit: [#8035] ESLINT FIX: no-else-return

Posted by he...@apache.org.
[#8035] ESLINT FIX: no-else-return


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

Branch: refs/heads/hs/8035
Commit: 151a3ea53873e56e6a716e430371313045f39abc
Parents: 576e32e
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 19:52:56 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:05 2016 -0500

----------------------------------------------------------------------
 Allura/allura/public/nf/js/navbar.es6.js | 40 +++++++++++++--------------
 1 file changed, 19 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/151a3ea5/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 44e2caf..ffaa371 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -531,35 +531,33 @@ var Main = React.createClass({
     render: function() {
         var _this = this;
         var navBarSwitch = showAdmin => {
+            var navbar;
             if (showAdmin) {
-                return (
-                    <AdminNav
-                        tools={ _this.state.data.menu }
+                navbar = <AdminNav
+                    tools={ _this.state.data.menu }
+                    installableTools={ _this.state.data.installable_tools }
+                    data={ _this.state.data }
+                    onToolReorder={ _this.onToolReorder }
+                    onToolDragStart={ _this.onToolDragStart }
+                    editMode={ _this.state.visible }
+                    currentOptionMenu={ _this.state.currentOptionMenu }
+                    onOptionClick={ _this.handleShowOptionMenu }
+                    currentToolOptions={this.state.currentToolOptions}
+                />;
+            } else {
+                navbar = <div>
+                    <NormalNavBar
+                        items={ _this.state.data.menu }
                         installableTools={ _this.state.data.installable_tools }
-                        data={ _this.state.data }
-                        onToolReorder={ _this.onToolReorder }
-                        onToolDragStart={ _this.onToolDragStart }
-                        editMode={ _this.state.visible }
-                        currentOptionMenu={ _this.state.currentOptionMenu }
-                        onOptionClick={ _this.handleShowOptionMenu }
-                        currentToolOptions={this.state.currentToolOptions}
                     />
-                );
-            } else {
-                return (
-                    <div>
-                        <NormalNavBar
-                            items={ _this.state.data.menu }
-                            installableTools={ _this.state.data.installable_tools }
-                            />
-                    </div>
-                );
+                </div>;
             }
+            return navbar;
         };
         var navBar = navBarSwitch(this.state.visible);
 
         var max_tool_count = _.chain(this.state.data.menu)
-                             .map((item) => {
+                             .map(item => {
                                  return item.children ? _.pluck(item.children, 'tool_name') : item.tool_name;
                              })
                              .flatten()


[16/24] allura git commit: [#8035] ESLINT FIX: require-jsdoc, valid-jsdoc

Posted by he...@apache.org.
[#8035] ESLINT FIX: require-jsdoc, valid-jsdoc


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

Branch: refs/heads/hs/8035
Commit: bf0029de2b4ff8bab01d39a65117f29354443aa3
Parents: a56b71a
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 19:18:12 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:04 2016 -0500

----------------------------------------------------------------------
 .eslintrc                                |  8 +++++++-
 Allura/allura/public/nf/js/navbar.es6.js | 27 ++++++++++++---------------
 2 files changed, 19 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/bf0029de/.eslintrc
----------------------------------------------------------------------
diff --git a/.eslintrc b/.eslintrc
index ff25e9d..835cf29 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -4,7 +4,13 @@
     "indent": [2, 4],
     "jsx-quotes": [0],
     "quotes": [0],
-    "operator-linebreak": [2, "before", { "overrides": { "?": "after", "&&": "after" } }]
+    "operator-linebreak": [2, "before", { "overrides": { "?": "after", "&&": "after" } }],
+    "require-jsdoc": [2, {"require": {
+        "FunctionDeclaration": true,
+        "MethodDefinition": false,
+        "ClassDeclaration": false
+    }
+  }]
   },
   "globals": {
     "ReactDOM": true,

http://git-wip-us.apache.org/repos/asf/allura/blob/bf0029de/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 2d0201e..d83f1f0 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -21,18 +21,17 @@
 'use strict';
 
 /**
- * Gets the current project url.
-
- * @constructor
- * @param {bool} rest - Return a "rest" version of the url.
- * @returns {string}
- */
-function _getProjectUrl(rest = true) {
+* Gets the current project url.
+* @param {boolean} rest - Return a "rest" version of the url.
+* @returns {string} - Project Url
+*/
+var _getProjectUrl = function(rest = true) {
     var nbhd;
     var proj;
     var nbhd_proj;
-    var ident_classes = document.getElementById('page-body').className.split(' ');
-    for (var cls of ident_classes) {
+    var identClasses = document.getElementById('page-body').className.split(' ');
+    var basePath = rest ? '/rest/' : '/';
+    for (var cls of identClasses) {
         if (cls.indexOf('project-') === 0) {
             proj = cls.slice('project-'.length);
         }
@@ -43,8 +42,8 @@ function _getProjectUrl(rest = true) {
     } else {
         nbhd_proj = `${nbhd}/${proj}`;
     }
-    return (rest ? '/rest/' : '/') + nbhd_proj;
-}
+    return basePath + nbhd_proj;
+};
 
 const ToolsPropType = React.PropTypes.shape({
     mount_point: React.PropTypes.string,
@@ -469,8 +468,8 @@ var Main = React.createClass({
 
     /**
      * Handles the changing of the NavBars grouping threshold.
-
-     * @param {object} event
+     * @param {object} event Fired when the threshold changes
+     * @return {boolean} False
      */
     onUpdateThreshold: function(event) {
         var thres = event.target.value;
@@ -486,8 +485,6 @@ var Main = React.createClass({
 
     /**
      * Handles the sending and updating tool ordinals.
-
-     * @param {array} data - Array of tools
      */
     onToolReorder: function() {
         $('.react-drag.dragging').removeClass('dragging');


[07/24] allura git commit: [#8035] ESLINT FIX: no-undef

Posted by he...@apache.org.
[#8035] ESLINT FIX: no-undef


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

Branch: refs/heads/hs/8035
Commit: 4a703cf4264e7e4211fb86047a538b2f2384012f
Parents: dc05934
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 17:23:37 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:02 2016 -0500

----------------------------------------------------------------------
 .eslintrc | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/4a703cf4/.eslintrc
----------------------------------------------------------------------
diff --git a/.eslintrc b/.eslintrc
index 2ba7869..f3fb796 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -7,6 +7,7 @@
   },
   "globals": {
     "ReactDOM": true,
+    "React": true,
     "$": true,
     "window": true,
     "_": true,


[10/24] allura git commit: [#8035] ESLINT FIX: space-infix-ops

Posted by he...@apache.org.
[#8035] ESLINT FIX: space-infix-ops


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

Branch: refs/heads/hs/8035
Commit: 19ff557f76a82440a4801c7c7fce846e42163172
Parents: f17729f
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 18:34:22 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:03 2016 -0500

----------------------------------------------------------------------
 Allura/allura/public/nf/js/navbar.es6.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/19ff557f/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 818bb3e..a7266ae 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -286,7 +286,7 @@ var AdminNav = React.createClass({
         onOptionClick: React.PropTypes.func.isRequired
     },
 
-    buildMenu: function(items, isSubMenu=false) {
+    buildMenu: function(items, isSubMenu = false) {
         var _this = this;
         var [tools, anchoredTools, endTools] = [[], [], []];
         var subMenu;


[18/24] allura git commit: [#8035] ESLINT FIX: arrow-parens

Posted by he...@apache.org.
[#8035] ESLINT FIX: arrow-parens


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

Branch: refs/heads/hs/8035
Commit: 576e32e9d1b223bcef99e72c4748717b15b0bf76
Parents: 34a7580
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 19:47:24 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:05 2016 -0500

----------------------------------------------------------------------
 Allura/allura/public/nf/js/navbar.es6.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/576e32e9/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 52493bc..44e2caf 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -530,7 +530,7 @@ var Main = React.createClass({
 
     render: function() {
         var _this = this;
-        var navBarSwitch = (showAdmin) => {
+        var navBarSwitch = showAdmin => {
             if (showAdmin) {
                 return (
                     <AdminNav


[03/24] allura git commit: [#8035] ESLINT FIX: camelcase (add file override for api-heavy files)

Posted by he...@apache.org.
[#8035] ESLINT FIX: camelcase  (add file override for api-heavy files)


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

Branch: refs/heads/hs/8035
Commit: 79c4a4760ef6644763eea2e0f1101e3597dfb139
Parents: 901ae95
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 18:04:21 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:02 2016 -0500

----------------------------------------------------------------------
 Allura/allura/public/nf/js/context-menu.es6.js |  1 +
 Allura/allura/public/nf/js/navbar.es6.js       | 31 +++++++++++----------
 2 files changed, 17 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/79c4a476/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 7572fb3..96ab2e1 100644
--- a/Allura/allura/public/nf/js/context-menu.es6.js
+++ b/Allura/allura/public/nf/js/context-menu.es6.js
@@ -16,6 +16,7 @@
  specific language governing permissions and limitations
  under the License.
  */
+/* eslint camelcase: 0 */
 'use strict';
 
 

http://git-wip-us.apache.org/repos/asf/allura/blob/79c4a476/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 b1a0eb3..ee356a4 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -16,6 +16,7 @@
        specific language governing permissions and limitations
        under the License.
 */
+/* eslint camelcase: 0 */
 'use strict';
 
 /**
@@ -285,7 +286,7 @@ var AdminNav = React.createClass({
 
     buildMenu: function (items, isSubMenu=false) {
         var _this = this;
-        var [tools, anchored_tools, end_tools] = [[], [], []];
+        var [tools, anchoredTools, endTools] = [[], [], []];
         var subMenu, childOptionsOpen;
 
         for (let item of items) {
@@ -297,19 +298,19 @@ var AdminNav = React.createClass({
 
             var _handle = isSubMenu ? "draggable-handle-sub" : 'draggable-handle';
 
-            var tool_list, is_anchored;
+            var toolList, isAnchored;
             if (item.mount_point === 'admin') {
                 // force admin to end, just like 'Project.sitemap()' does
-                tool_list = end_tools;
-                is_anchored = true;
+                toolList = endTools;
+                isAnchored = true;
             } else if (item.is_anchored) {
-                tool_list = anchored_tools;
-                is_anchored = true;
+                toolList = anchoredTools;
+                isAnchored = true;
             } else {
-                tool_list = tools;
-                is_anchored = false;
+                toolList = tools;
+                isAnchored = false;
             }
-            var core_item = <NavBarItem
+            var coreItem = <NavBarItem
                 {..._this.props}
                 mount_point={ item.mount_point }
                 name={ item.name }
@@ -317,27 +318,27 @@ var AdminNav = React.createClass({
                 isGrouper={item.children && item.children.length > 0}
                 url={ item.url }
                 key={ 'tb-item-' + _.uniqueId() }
-                is_anchored={ is_anchored }
+                is_anchored={ isAnchored }
                 options={ item.admin_options }
             />;
             if (subMenu) {
                 childOptionsOpen = _.contains(_.pluck(item.children, 'mount_point'),
                     this.props.currentOptionMenu.tool);
 
-                tool_list.push(<NavBarItemWithSubMenu
+                toolList.push(<NavBarItemWithSubMenu
                     key={_.uniqueId()}
-                    tool={core_item}
+                    tool={coreItem}
                     subMenu={subMenu}
                     childOptionsOpen={childOptionsOpen}
                 />);
             } else {
-                tool_list.push(core_item);
+                toolList.push(coreItem);
             }
         }
 
         return (
             <div className='react-drag'>
-                { anchored_tools }
+                { anchoredTools }
                 <ReactReorderable
                     key={ 'reorder-' + _.uniqueId() }
                     handle={"." + _handle}
@@ -346,7 +347,7 @@ var AdminNav = React.createClass({
                     onDrop={ _this.props.onToolReorder }>
                     { tools }
                 </ReactReorderable>
-                { end_tools }
+                { endTools }
                 { !isSubMenu && <div id="add-tool-container" className="unlocked-container">
                     <ToggleAddNewTool installableTools={this.props.installableTools}/>
                 </div>}


[02/24] allura git commit: [#8035] Add eslint deps

Posted by he...@apache.org.
[#8035] Add eslint deps


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

Branch: refs/heads/hs/8035
Commit: 5c21c3b6ff7d7324068d0bb28fdbbb5c53f51126
Parents: 2dd2ff0
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 15:44:22 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:01 2016 -0500

----------------------------------------------------------------------
 package.json | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/5c21c3b6/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 3b27d67..1f12ff5 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,9 @@
     "test": "echo \"Error: no test specified\" && exit 1",
     "build": "rm -rf Allura/allura/public/nf/js/build/; broccoli build Allura/allura/public/nf/js/build/",
     "watch": "broccoli-timepiece Allura/allura/public/nf/js/build/",
-    "eslint": "eslint"
+    "env": "env",
+    "eslint": "eslint",
+    "lint": "eslint Allura/allura/public/nf/js/*.es6.js || true"
   },
   "repository": {
     "type": "git",
@@ -17,6 +19,7 @@
   "license": "Apache-2.0",
   "//": "When broccoli-babel-transpiler moves to babel 6, we'll need to add babel-plugin-transform-class-properties to our deps",
   "devDependencies": {
+    "babel-eslint": "^5.0.0-beta6",
     "broccoli": "^0.16.8",
     "broccoli-babel-transpiler": "^5.4.5",
     "broccoli-cli": "^1.0.0",
@@ -26,7 +29,9 @@
     "broccoli-timepiece": "^0.3.0",
     "broccoli-uglify-js": "^0.1.3",
     "eslint": "^1.10.3",
+    "eslint-config-google": "^0.3.0",
     "eslint-plugin-html": "^1.2.0",
+    "eslint-plugin-react": "^3.15.0",
     "esprima-fb": "^15001.1001.0-dev-harmony-fb"
   }
 }


[17/24] allura git commit: [#8035] ESLINT FIX: indent, block-scoped-var

Posted by he...@apache.org.
[#8035] ESLINT FIX: indent, block-scoped-var


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

Branch: refs/heads/hs/8035
Commit: 34a758008ea783ede72286944931b06dfa1dc02f
Parents: abb5144
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 19:44:56 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:05 2016 -0500

----------------------------------------------------------------------
 .eslintrc                                | 3 ++-
 Allura/allura/public/nf/js/navbar.es6.js | 6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/34a75800/.eslintrc
----------------------------------------------------------------------
diff --git a/.eslintrc b/.eslintrc
index e58bfe1..455b95a 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -11,7 +11,8 @@
         "ClassDeclaration": false
       }
     }],
-    "no-inline-comments": 0
+    "no-inline-comments": 0,
+    "comma-dangle": 0
   },
   "globals": {
     "ReactDOM": true,

http://git-wip-us.apache.org/repos/asf/allura/blob/34a75800/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 23f9313..52493bc 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -171,7 +171,7 @@ var NormalNavItem = React.createClass({
         url: React.PropTypes.string.isRequired,
         classes: React.PropTypes.string
     },
-  mixins: [React.addons.PureRenderMixin],
+    mixins: [React.addons.PureRenderMixin],
     render: function() {
         return (
             <li key={`tb-norm-${_.uniqueId()}`}>
@@ -291,7 +291,7 @@ var AdminNav = React.createClass({
         var [tools, anchoredTools, endTools] = [[], [], []];
         var subMenu;
         var childOptionsOpen;
-
+        var _handle;
         for (let item of items) {
             if (item.children) {
                 subMenu = this.buildMenu(item.children, true);
@@ -299,7 +299,7 @@ var AdminNav = React.createClass({
                 subMenu = null;
             }
 
-            var _handle = isSubMenu ? "draggable-handle-sub" : 'draggable-handle';
+            _handle = isSubMenu ? "draggable-handle-sub" : 'draggable-handle';
             var toolList;
             var isAnchored;
             if (item.mount_point === 'admin') {


[04/24] allura git commit: [#8035] ESLINT FIX: quotes, jsx-quotes

Posted by he...@apache.org.
[#8035] ESLINT FIX: quotes, jsx-quotes


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

Branch: refs/heads/hs/8035
Commit: 901ae95de0182c6850ac9e98cf3b046d3257b2f4
Parents: 3be51b2
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 17:44:54 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:02 2016 -0500

----------------------------------------------------------------------
 .eslintrc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/901ae95d/.eslintrc
----------------------------------------------------------------------
diff --git a/.eslintrc b/.eslintrc
index a66f2fa..b42eb66 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,7 +1,9 @@
 {
   "rules": {
     "max-len": [1, 119, 4],
-    "indent": [2, 4]
+    "indent": [2, 4],
+    "jsx-quotes": [0],
+    "quotes": [0]
   },
   "globals": {
     "ReactDOM": true,


[15/24] allura git commit: [#8035] ESLINT FIX: no-unused-var

Posted by he...@apache.org.
[#8035] ESLINT FIX: no-unused-var


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

Branch: refs/heads/hs/8035
Commit: a56b71a0062c9ee6e6362888a27d9a561f44cbbe
Parents: 9f7932f
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 18:43:29 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:04 2016 -0500

----------------------------------------------------------------------
 Allura/allura/public/nf/js/context-menu.es6.js | 2 ++
 Allura/allura/public/nf/js/navbar.es6.js       | 7 +++++--
 Allura/allura/public/nf/js/tooltip.es6.js      | 2 ++
 3 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/a56b71a0/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 ec5b68d..1762ffb 100644
--- a/Allura/allura/public/nf/js/context-menu.es6.js
+++ b/Allura/allura/public/nf/js/context-menu.es6.js
@@ -78,3 +78,5 @@ class ContextMenu extends React.Component {
         );
     }
 }
+
+module.exports(ContextMenu);

http://git-wip-us.apache.org/repos/asf/allura/blob/a56b71a0/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 585d004..2d0201e 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -17,6 +17,7 @@
        under the License.
 */
 /* eslint camelcase: 0 */
+/* exported Main */
 'use strict';
 
 /**
@@ -109,7 +110,7 @@ var NavBarItem = React.createClass({
         );
     },
 
-    handleOptionClick: function(event) {
+    handleOptionClick: function() {
         this.props.onOptionClick(this.props.mount_point);
     }
 });
@@ -244,7 +245,7 @@ var NormalNavBar = React.createClass({
         ).isRequired
     },
 
-    buildMenu: function(item, i) {
+    buildMenu: function(item) {
         let classes = window.location.pathname.startsWith(item.url) ? 'active-nav-link' : '';
 
         var subMenu;
@@ -588,3 +589,5 @@ var Main = React.createClass({
         );
     }
 });
+
+module.exports(Main);

http://git-wip-us.apache.org/repos/asf/allura/blob/a56b71a0/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 95f7188..f24fc16 100644
--- a/Allura/allura/public/nf/js/tooltip.es6.js
+++ b/Allura/allura/public/nf/js/tooltip.es6.js
@@ -75,3 +75,5 @@ class ToolTip extends React.Component {
     }
 }
 
+module.exports(ToolTip);
+


[13/24] allura git commit: [#8035] ESLINT FIX: block-spacing, no-inline-comments

Posted by he...@apache.org.
[#8035] ESLINT FIX: block-spacing, no-inline-comments


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

Branch: refs/heads/hs/8035
Commit: 80f46bd262c9891568cd3b8ead3a749fb417fbe9
Parents: bf0029d
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 19:25:59 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Tue Jan 26 14:11:04 2016 -0500

----------------------------------------------------------------------
 .eslintrc                                      | 5 +++--
 Allura/allura/public/nf/js/context-menu.es6.js | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/80f46bd2/.eslintrc
----------------------------------------------------------------------
diff --git a/.eslintrc b/.eslintrc
index 835cf29..e58bfe1 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -9,8 +9,9 @@
         "FunctionDeclaration": true,
         "MethodDefinition": false,
         "ClassDeclaration": false
-    }
-  }]
+      }
+    }],
+    "no-inline-comments": 0
   },
   "globals": {
     "ReactDOM": true,

http://git-wip-us.apache.org/repos/asf/allura/blob/80f46bd2/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 1762ffb..4c2958d 100644
--- a/Allura/allura/public/nf/js/context-menu.es6.js
+++ b/Allura/allura/public/nf/js/context-menu.es6.js
@@ -41,7 +41,6 @@ class ContextMenu extends React.Component {
             /* the :not filter should've worked as a 2nd param to .on() instead of this,
              but clicks in the page gutter were being delayed for some reason */
             if ($(evt.target).is(':not(.contextMenu)')) {
-
                 /* if clicking directly onto another gear, set it directly.
                  this is necessary since sometimes our jquery events seem to interfere with the react event
                  that is supposed to handle this kind of thing */