From 177a4c51e66ebf09c4e58e05dc6a2d64ceed767b Mon Sep 17 00:00:00 2001 From: Chiawen Chen Date: Sun, 8 Sep 2019 01:51:01 +0800 Subject: [PATCH] Add missing jsdocs --- lib/rules/jsx-no-useless-fragment.js | 4 +++- lib/util/jsx.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/rules/jsx-no-useless-fragment.js b/lib/rules/jsx-no-useless-fragment.js index 22ae071e29..778975068a 100644 --- a/lib/rules/jsx-no-useless-fragment.js +++ b/lib/rules/jsx-no-useless-fragment.js @@ -14,6 +14,7 @@ function isJSXText(node) { /** * @param {string} text + * @returns {boolean} */ function isOnlyWhitespace(text) { return text.trim().length === 0; @@ -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) { @@ -158,7 +160,7 @@ module.exports = { /** * @param {ASTNode} node - * @returns {((fixer: object) => object) | undefined} + * @returns {Function | undefined} */ function getFix(node) { if (!canFix(node)) { diff --git a/lib/util/jsx.js b/lib/util/jsx.js index d694becc61..6f8cbfde29 100644 --- a/lib/util/jsx.js +++ b/lib/util/jsx.js @@ -67,6 +67,7 @@ function isJSX(node) { /** * Check if node is like `key={...}` as in `` * @param {ASTNode} node + * @returns {boolean} */ function isJSXAttributeKey(node) { return node.type === 'JSXAttribute' &&