Skip to content

Commit 177a4c5

Browse files
committed
Add missing jsdocs
1 parent 0d0868d commit 177a4c5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/rules/jsx-no-useless-fragment.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ function isJSXText(node) {
1414

1515
/**
1616
* @param {string} text
17+
* @returns {boolean}
1718
*/
1819
function isOnlyWhitespace(text) {
1920
return text.trim().length === 0;
@@ -97,6 +98,7 @@ module.exports = {
9798
/**
9899
* Test whether a JSXElement has less than two children, excluding paddings spaces.
99100
* @param {JSXElement|JSXFragment} node
101+
* @returns {boolean}
100102
*/
101103
function hasLessThanTwoChildren(node) {
102104
if (!node || !node.children || node.children.length < 2) {
@@ -158,7 +160,7 @@ module.exports = {
158160

159161
/**
160162
* @param {ASTNode} node
161-
* @returns {((fixer: object) => object) | undefined}
163+
* @returns {Function | undefined}
162164
*/
163165
function getFix(node) {
164166
if (!canFix(node)) {

lib/util/jsx.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ function isJSX(node) {
6767
/**
6868
* Check if node is like `key={...}` as in `<Foo key={...} />`
6969
* @param {ASTNode} node
70+
* @returns {boolean}
7071
*/
7172
function isJSXAttributeKey(node) {
7273
return node.type === 'JSXAttribute' &&

0 commit comments

Comments
 (0)