From ffb75c866f790fb1a7dd2cda20365a90d0b74f6f Mon Sep 17 00:00:00 2001 From: ocavue Date: Sat, 12 Oct 2024 13:04:19 +1100 Subject: [PATCH] Add eslint-disable-next-line valid-jsdoc --- lib/rules/jsx-no-literals.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/rules/jsx-no-literals.js b/lib/rules/jsx-no-literals.js index 6eb1c401fd..d782433b0c 100644 --- a/lib/rules/jsx-no-literals.js +++ b/lib/rules/jsx-no-literals.js @@ -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 @@ -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 @@ -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 @@ -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 @@ -363,6 +367,7 @@ module.exports = { } } + // eslint-disable-next-line valid-jsdoc /** * @param {import("../../types/rules/jsx-no-literals").ResolvedConfig} resolvedConfig * @returns {boolean} @@ -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 @@ -388,6 +394,7 @@ module.exports = { return resolvedConfig.type === 'override' ? 'literalNotInJSXExpressionInElement' : 'literalNotInJSXExpression'; } + // eslint-disable-next-line valid-jsdoc /** * @param {ASTNode} node * @param {string} messageId