Skip to content

Commit

Permalink
Add missing jsdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
golopot committed Sep 7, 2019
1 parent 0d0868d commit 177a4c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/rules/jsx-no-useless-fragment.js
Expand Up @@ -14,6 +14,7 @@ function isJSXText(node) {

/**
* @param {string} text
* @returns {boolean}
*/
function isOnlyWhitespace(text) {
return text.trim().length === 0;
Expand Down Expand Up @@ -97,6 +98,7 @@ module.exports = {
/**
* Test whether a JSXElement has less than two children, excluding paddings spaces.
* @param {JSXElement|JSXFragment} node
* @returns {boolean}
*/
function hasLessThanTwoChildren(node) {
if (!node || !node.children || node.children.length < 2) {
Expand Down Expand Up @@ -158,7 +160,7 @@ module.exports = {

/**
* @param {ASTNode} node
* @returns {((fixer: object) => object) | undefined}
* @returns {Function | undefined}
*/
function getFix(node) {
if (!canFix(node)) {
Expand Down
1 change: 1 addition & 0 deletions lib/util/jsx.js
Expand Up @@ -67,6 +67,7 @@ function isJSX(node) {
/**
* Check if node is like `key={...}` as in `<Foo key={...} />`
* @param {ASTNode} node
* @returns {boolean}
*/
function isJSXAttributeKey(node) {
return node.type === 'JSXAttribute' &&
Expand Down

0 comments on commit 177a4c5

Please sign in to comment.