Skip to content

Commit

Permalink
Add eslint-disable-next-line valid-jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
ocavue committed Oct 12, 2024
1 parent 5d108e8 commit ffb75c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/rules/jsx-no-literals.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const commonPropertiesSchema = {
},
};

// eslint-disable-next-line valid-jsdoc
/**
* Normalizes the element portion of the config
* @param {import("../../types/rules/jsx-no-literals").RawConfig} config
Expand All @@ -82,6 +83,7 @@ function normalizeElementConfig(config) {
};
}

// eslint-disable-next-line valid-jsdoc
/**
* Normalizes the config and applies default values to all config options
* @param {import("../../types/rules/jsx-no-literals").RawConfig} config
Expand Down Expand Up @@ -294,6 +296,7 @@ module.exports = {
return some(iterFrom([ancestors.parent, ancestors.grandParent]), (parent) => jsxElementTypes.has(parent.type));
}

// eslint-disable-next-line valid-jsdoc
/**
* Determines whether a given node's value and its immediate parent are
* viable text nodes that can/should be reported on
Expand Down Expand Up @@ -325,6 +328,7 @@ module.exports = {
return isStandardJSXNode && parent.type !== 'JSXExpressionContainer';
}

// eslint-disable-next-line valid-jsdoc
/**
* Gets an override config for a given node. For any given node, we also
* need to traverse the ancestor tree to determine if an ancestor's config
Expand Down Expand Up @@ -363,6 +367,7 @@ module.exports = {
}
}

// eslint-disable-next-line valid-jsdoc
/**
* @param {import("../../types/rules/jsx-no-literals").ResolvedConfig} resolvedConfig
* @returns {boolean}
Expand All @@ -371,6 +376,7 @@ module.exports = {
return resolvedConfig.type === 'override' && 'allowElement' in resolvedConfig && !!resolvedConfig.allowElement;
}

// eslint-disable-next-line valid-jsdoc
/**
* @param {boolean} ancestorIsJSXElement
* @param {import("../../types/rules/jsx-no-literals").ResolvedConfig} resolvedConfig
Expand All @@ -388,6 +394,7 @@ module.exports = {
return resolvedConfig.type === 'override' ? 'literalNotInJSXExpressionInElement' : 'literalNotInJSXExpression';
}

// eslint-disable-next-line valid-jsdoc
/**
* @param {ASTNode} node
* @param {string} messageId
Expand Down

0 comments on commit ffb75c8

Please sign in to comment.