Skip to content

Commit

Permalink
fix code style warned by fecs-valid-jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswong committed Jul 13, 2015
1 parent 3a1c19b commit 1fc7459
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
3 changes: 3 additions & 0 deletions lib/js/rules/indent.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ module.exports = function (context) {

/**
* Check indent for function block content
*
* @param {ASTNode} node AST node
*/
var checkIndentInFunctionBlock = function (node) {
Expand Down Expand Up @@ -153,6 +154,7 @@ module.exports = function (context) {

/**
* Check indent for array block content or object block content
*
* @param {ASTNode} node AST node
*/
var checkIndentInArrayOrObjectBlock = function (node) {
Expand Down Expand Up @@ -191,6 +193,7 @@ module.exports = function (context) {

/**
* Check indent for html strings array
*
* @param {ASTNode} node AST node
* @return {boolean}
*/
Expand Down
15 changes: 10 additions & 5 deletions lib/js/rules/key-spacing.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@
//------------------------------------------------------------------------------

/**
* Checks whether a string contains a line terminator as defined in
* http://www.ecma-international.org/ecma-262/5.1/#sec-7.3
* @param {string} str String to test.
* @return {boolean} True if str contains a line terminator.
*/
* Checks whether a string contains a line terminator as defined in
* http://www.ecma-international.org/ecma-262/5.1/#sec-7.3
*
* @param {string} str String to test.
* @return {boolean} True if str contains a line terminator.
*/
function containsLineTerminator(str) {
return /[\n\r\u2028\u2029]/.test(str);
}

/**
* Gets an object literal property's key as the identifier name or string value.
*
* @param {ASTNode} property Property node whose key to retrieve.
* @return {string} The property's key.
*/
Expand All @@ -30,6 +32,7 @@ function getKey(property) {

/**
* Gets the number of characters in a key, including quotes around string keys.
*
* @param {ASTNode} property Property of on object literal.
* @return {number} Width of the key, including string quotes where present.
*/
Expand Down Expand Up @@ -66,6 +69,7 @@ module.exports = function (context) {

/**
* Gets the whitespace around the colon in an object literal property
*
* @param {ASTNode} property Property node from an object literal
* @return {Object} Whitespace before and after the property's colon
*/
Expand All @@ -85,6 +89,7 @@ module.exports = function (context) {
/**
* Reports an appropriately-formatted error if spacing is incorrect on one
* side of the colon.
*
* @param {ASTNode} property Key-value pair in an object literal.
* @param {string} side Side being verified - either "key" or "value".
* @param {string} whitespace Actual whitespace string.
Expand Down
3 changes: 3 additions & 0 deletions lib/js/rules/valid-jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module.exports = function (context) {

/**
* When parsing a new function, store it in our function stack.
*
* @return {void}
* @private
*/
Expand All @@ -43,6 +44,7 @@ module.exports = function (context) {

/**
* Indicate that return has been found in the current function.
*
* @param {ASTNode} node The return node.
* @return {void}
* @private
Expand Down Expand Up @@ -195,6 +197,7 @@ module.exports = function (context) {

/**
* Validate the JSDoc node and output warnings if anything is wrong.
*
* @param {ASTNode} node The AST node to check.
* @return {void}
* @private
Expand Down

0 comments on commit 1fc7459

Please sign in to comment.