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/22 01:59:43 UTC
[10/20] allura git commit: [#8035] ESLINT FIX: require-jsdoc,
valid-jsdoc
[#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/10b886f5
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/10b886f5
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/10b886f5
Branch: refs/heads/hs/8035
Commit: 10b886f557dec866ea81cb2e76a79d2e29e1c87e
Parents: b26d6db
Author: Heith Seewald <he...@gmail.com>
Authored: Thu Jan 21 19:18:12 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Thu Jan 21 19:59:14 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/10b886f5/.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/10b886f5/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');