eslint-plugin-jsdoc 61.1.11 → 61.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/buildForbidRuleDefinition.cjs +1 -3
  2. package/dist/buildForbidRuleDefinition.cjs.map +1 -1
  3. package/dist/buildForbidRuleDefinition.d.ts +1 -1
  4. package/dist/buildRejectOrPreferRuleDefinition.cjs +1 -3
  5. package/dist/buildRejectOrPreferRuleDefinition.cjs.map +1 -1
  6. package/dist/buildRejectOrPreferRuleDefinition.d.ts +1 -1
  7. package/dist/cjs/buildForbidRuleDefinition.d.ts +1 -1
  8. package/dist/cjs/buildRejectOrPreferRuleDefinition.d.ts +1 -1
  9. package/dist/cjs/iterateJsdoc.d.ts +2 -4
  10. package/dist/cjs/rules/checkTypes.d.ts +1 -1
  11. package/dist/cjs/rules/convertToJsdocComments.d.ts +105 -97
  12. package/dist/cjs/rules/noRestrictedSyntax.d.ts +1 -1
  13. package/dist/cjs/rules/requireTags.d.ts +1 -1
  14. package/dist/exportParser.cjs +1 -0
  15. package/dist/exportParser.cjs.map +1 -1
  16. package/dist/iterateJsdoc.cjs +3 -7
  17. package/dist/iterateJsdoc.cjs.map +1 -1
  18. package/dist/iterateJsdoc.d.ts +2 -4
  19. package/dist/jsdocUtils.cjs +4 -2
  20. package/dist/jsdocUtils.cjs.map +1 -1
  21. package/dist/rules/checkTypes.d.ts +1 -1
  22. package/dist/rules/convertToJsdocComments.cjs +1 -0
  23. package/dist/rules/convertToJsdocComments.cjs.map +1 -1
  24. package/dist/rules/convertToJsdocComments.d.ts +105 -97
  25. package/dist/rules/noRestrictedSyntax.d.ts +1 -1
  26. package/dist/rules/noUndefinedTypes.cjs +10 -1
  27. package/dist/rules/noUndefinedTypes.cjs.map +1 -1
  28. package/dist/rules/requireFileOverview.cjs +1 -1
  29. package/dist/rules/requireFileOverview.cjs.map +1 -1
  30. package/dist/rules/requireJsdoc.cjs +1 -0
  31. package/dist/rules/requireJsdoc.cjs.map +1 -1
  32. package/dist/rules/requireParam.cjs +1 -1
  33. package/dist/rules/requireParam.cjs.map +1 -1
  34. package/dist/rules/requireTags.d.ts +1 -1
  35. package/package.json +7 -7
  36. package/src/buildForbidRuleDefinition.js +1 -3
  37. package/src/buildRejectOrPreferRuleDefinition.js +1 -3
  38. package/src/exportParser.js +1 -0
  39. package/src/iterateJsdoc.js +3 -7
  40. package/src/jsdocUtils.js +9 -3
  41. package/src/rules/convertToJsdocComments.js +1 -0
  42. package/src/rules/noUndefinedTypes.js +11 -0
  43. package/src/rules/requireFileOverview.js +1 -1
  44. package/src/rules/requireJsdoc.js +1 -0
  45. package/src/rules/requireParam.js +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"convertToJsdocComments.cjs","names":["_iterateJsdoc","require","_jsdocUtils","_jsdoccomment","_default","exports","default","create","context","sourceCode","getSourceCode","settings","getSettings","allowedPrefixes","contexts","contextsAfter","contextsBeforeAndAfter","enableFixer","enforceJsdocLineStyle","lineOrBlockStyle","options","reportingNonJsdoc","report","messageId","comment","node","fixer","loc","end","column","line","start","fix","getFixer","addComment","ctxts","lines","minLines","maxLines","baseNode","getReducedASTNode","decorator","getDecorator","indent","getIndent","text","getText","inlineCommentBlock","find","contxt","ctxt","type","reportings","checkNonJsdoc","_info","_handler","getNonJsdocComment","some","prefix","value","trimStart","startsWith","commentToAdd","insertion","trim","trimEnd","repeat","replaceText","checkNonJsdocAfter","getFollowingComment","slice","remove","insertTextBefore","parent","getContextObject","enforcedContexts","meta","docs","description","url","fixable","messages","blockCommentsJsdocStyle","lineCommentsJsdocStyle","schema","additionalProperties","properties","items","anyOf","enum","module"],"sources":["../../src/rules/convertToJsdocComments.js"],"sourcesContent":["import {\n getSettings,\n} from '../iterateJsdoc.js';\nimport {\n enforcedContexts,\n getContextObject,\n getIndent,\n} from '../jsdocUtils.js';\nimport {\n getDecorator,\n getFollowingComment,\n getNonJsdocComment,\n getReducedASTNode,\n} from '@es-joy/jsdoccomment';\n\n/** @type {import('eslint').Rule.RuleModule} */\nexport default {\n create (context) {\n /**\n * @typedef {import('eslint').AST.Token | import('estree').Comment | {\n * type: import('eslint').AST.TokenType|\"Line\"|\"Block\"|\"Shebang\",\n * range: [number, number],\n * value: string\n * }} Token\n */\n\n /**\n * @callback AddComment\n * @param {boolean|undefined} inlineCommentBlock\n * @param {Token} comment\n * @param {string} indent\n * @param {number} lines\n * @param {import('eslint').Rule.RuleFixer} fixer\n */\n\n /* c8 ignore next -- Fallback to deprecated method */\n const {\n sourceCode = context.getSourceCode(),\n } = context;\n const settings = getSettings(context);\n if (!settings) {\n return {};\n }\n\n const {\n allowedPrefixes = [\n '@ts-', 'istanbul ', 'c8 ', 'v8 ', 'eslint', 'prettier-',\n ],\n contexts = settings.contexts || [],\n contextsAfter = /** @type {string[]} */ ([]),\n contextsBeforeAndAfter = [\n 'VariableDeclarator', 'TSPropertySignature', 'PropertyDefinition',\n ],\n enableFixer = true,\n enforceJsdocLineStyle = 'multi',\n lineOrBlockStyle = 'both',\n } = context.options[0] ?? {};\n\n let reportingNonJsdoc = false;\n\n /**\n * @param {string} messageId\n * @param {import('estree').Comment|Token} comment\n * @param {import('eslint').Rule.Node} node\n * @param {import('eslint').Rule.ReportFixer} fixer\n */\n const report = (messageId, comment, node, fixer) => {\n const loc = {\n end: {\n column: 0,\n /* c8 ignore next 2 -- Guard */\n // @ts-expect-error Ok\n line: (comment.loc?.start?.line ?? 1),\n },\n start: {\n column: 0,\n /* c8 ignore next 2 -- Guard */\n // @ts-expect-error Ok\n line: (comment.loc?.start?.line ?? 1),\n },\n };\n\n context.report({\n fix: enableFixer ? fixer : null,\n loc,\n messageId,\n node,\n });\n };\n\n /**\n * @param {import('eslint').Rule.Node} node\n * @param {import('eslint').AST.Token | import('estree').Comment | {\n * type: import('eslint').AST.TokenType|\"Line\"|\"Block\"|\"Shebang\",\n * range: [number, number],\n * value: string\n * }} comment\n * @param {AddComment} addComment\n * @param {import('../iterateJsdoc.js').Context[]} ctxts\n */\n const getFixer = (node, comment, addComment, ctxts) => {\n return /** @type {import('eslint').Rule.ReportFixer} */ (fixer) => {\n // Default to one line break if the `minLines`/`maxLines` settings allow\n const lines = settings.minLines === 0 && settings.maxLines >= 1 ? 1 : settings.minLines;\n let baseNode =\n /**\n * @type {import('@typescript-eslint/types').TSESTree.Node|import('eslint').Rule.Node}\n */ (\n getReducedASTNode(node, sourceCode)\n );\n\n const decorator = getDecorator(\n /** @type {import('eslint').Rule.Node} */\n (baseNode),\n );\n if (decorator) {\n baseNode = /** @type {import('@typescript-eslint/types').TSESTree.Decorator} */ (\n decorator\n );\n }\n\n const indent = getIndent({\n text: sourceCode.getText(\n /** @type {import('eslint').Rule.Node} */ (baseNode),\n /** @type {import('eslint').AST.SourceLocation} */\n (\n /** @type {import('eslint').Rule.Node} */ (baseNode).loc\n ).start.column,\n ),\n });\n\n const {\n inlineCommentBlock,\n } =\n /**\n * @type {{\n * context: string,\n * inlineCommentBlock: boolean,\n * minLineCount: import('../iterateJsdoc.js').Integer\n * }[]}\n */ (ctxts).find((contxt) => {\n if (typeof contxt === 'string') {\n return false;\n }\n\n const {\n context: ctxt,\n } = contxt;\n return ctxt === node.type;\n }) || {};\n\n return addComment(inlineCommentBlock, comment, indent, lines, fixer);\n };\n };\n\n /**\n * @param {import('eslint').AST.Token | import('estree').Comment | {\n * type: import('eslint').AST.TokenType|\"Line\"|\"Block\"|\"Shebang\",\n * range: [number, number],\n * value: string\n * }} comment\n * @param {import('eslint').Rule.Node} node\n * @param {AddComment} addComment\n * @param {import('../iterateJsdoc.js').Context[]} ctxts\n */\n const reportings = (comment, node, addComment, ctxts) => {\n const fixer = getFixer(node, comment, addComment, ctxts);\n\n if (comment.type === 'Block') {\n if (lineOrBlockStyle === 'line') {\n return;\n }\n\n report('blockCommentsJsdocStyle', comment, node, fixer);\n return;\n }\n\n if (comment.type === 'Line') {\n if (lineOrBlockStyle === 'block') {\n return;\n }\n\n report('lineCommentsJsdocStyle', comment, node, fixer);\n }\n };\n\n /**\n * @type {import('../iterateJsdoc.js').CheckJsdoc}\n */\n const checkNonJsdoc = (_info, _handler, node) => {\n const comment = getNonJsdocComment(sourceCode, node, settings);\n\n if (\n !comment ||\n /** @type {string[]} */\n (allowedPrefixes).some((prefix) => {\n return comment.value.trimStart().startsWith(prefix);\n })\n ) {\n return;\n }\n\n reportingNonJsdoc = true;\n\n /** @type {AddComment} */\n // eslint-disable-next-line unicorn/consistent-function-scoping -- Avoid conflicts\n const addComment = (inlineCommentBlock, commentToAdd, indent, lines, fixer) => {\n const insertion = (\n inlineCommentBlock || enforceJsdocLineStyle === 'single' ?\n `/** ${commentToAdd.value.trim()} ` :\n `/**\\n${indent}*${commentToAdd.value.trimEnd()}\\n${indent}`\n ) +\n `*/${'\\n'.repeat((lines || 1) - 1)}`;\n\n return fixer.replaceText(\n /** @type {import('eslint').AST.Token} */\n (commentToAdd),\n insertion,\n );\n };\n\n reportings(comment, node, addComment, contexts);\n };\n\n /**\n * @param {import('eslint').Rule.Node} node\n * @param {import('../iterateJsdoc.js').Context[]} ctxts\n */\n const checkNonJsdocAfter = (node, ctxts) => {\n const comment = getFollowingComment(sourceCode, node);\n\n if (\n !comment ||\n comment.value.startsWith('*') ||\n /** @type {string[]} */\n (allowedPrefixes).some((prefix) => {\n return comment.value.trimStart().startsWith(prefix);\n })\n ) {\n return;\n }\n\n /** @type {AddComment} */\n const addComment = (inlineCommentBlock, commentToAdd, indent, lines, fixer) => {\n const insertion = (\n inlineCommentBlock || enforceJsdocLineStyle === 'single' ?\n `/** ${commentToAdd.value.trim()} ` :\n `/**\\n${indent}*${commentToAdd.value.trimEnd()}\\n${indent}`\n ) +\n `*/${'\\n'.repeat((lines || 1) - 1)}${lines ? `\\n${indent.slice(1)}` : ' '}`;\n\n return [\n fixer.remove(\n /** @type {import('eslint').AST.Token} */\n (commentToAdd),\n ), fixer.insertTextBefore(\n node.type === 'VariableDeclarator' ? node.parent : node,\n insertion,\n ),\n ];\n };\n\n reportings(comment, node, addComment, ctxts);\n };\n\n // Todo: add contexts to check after (and handle if want both before and after)\n return {\n ...getContextObject(\n enforcedContexts(context, true, settings),\n checkNonJsdoc,\n ),\n ...getContextObject(\n contextsAfter,\n (_info, _handler, node) => {\n checkNonJsdocAfter(node, contextsAfter);\n },\n ),\n ...getContextObject(\n contextsBeforeAndAfter,\n (_info, _handler, node) => {\n checkNonJsdoc({}, null, node);\n if (!reportingNonJsdoc) {\n checkNonJsdocAfter(node, contextsBeforeAndAfter);\n }\n },\n ),\n };\n },\n meta: {\n docs: {\n description: 'Converts non-JSDoc comments preceding or following nodes into JSDoc ones',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/convert-to-jsdoc-comments.md#repos-sticky-header',\n },\n\n fixable: 'code',\n\n messages: {\n blockCommentsJsdocStyle: 'Block comments should be JSDoc-style.',\n lineCommentsJsdocStyle: 'Line comments should be JSDoc-style.',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n allowedPrefixes: {\n description: `An array of prefixes to allow at the beginning of a comment.\n\nDefaults to \\`['@ts-', 'istanbul ', 'c8 ', 'v8 ', 'eslint', 'prettier-']\\`.\n\nSupplying your own value overrides the defaults.`,\n items: {\n type: 'string',\n },\n type: 'array',\n },\n contexts: {\n description: `The contexts array which will be checked for preceding content.\n\nCan either be strings or an object with a \\`context\\` string and an optional, default \\`false\\` \\`inlineCommentBlock\\` boolean.\n\nDefaults to \\`ArrowFunctionExpression\\`, \\`FunctionDeclaration\\`,\n\\`FunctionExpression\\`, \\`TSDeclareFunction\\`.`,\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n context: {\n type: 'string',\n },\n inlineCommentBlock: {\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n contextsAfter: {\n description: `The contexts array which will be checked for content on the same line after.\n\nCan either be strings or an object with a \\`context\\` string and an optional, default \\`false\\` \\`inlineCommentBlock\\` boolean.\n\nDefaults to an empty array.`,\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n context: {\n type: 'string',\n },\n inlineCommentBlock: {\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n contextsBeforeAndAfter: {\n description: `The contexts array which will be checked for content before and on the same\nline after.\n\nCan either be strings or an object with a \\`context\\` string and an optional, default \\`false\\` \\`inlineCommentBlock\\` boolean.\n\nDefaults to \\`VariableDeclarator\\`, \\`TSPropertySignature\\`, \\`PropertyDefinition\\`.`,\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n context: {\n type: 'string',\n },\n inlineCommentBlock: {\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n enableFixer: {\n description: 'Set to `false` to disable fixing.',\n type: 'boolean',\n },\n enforceJsdocLineStyle: {\n description: `What policy to enforce on the conversion of non-JSDoc comments without\nline breaks. (Non-JSDoc (mulitline) comments with line breaks will always\nbe converted to \\`multi\\` style JSDoc comments.)\n\n- \\`multi\\` - Convert to multi-line style\n\\`\\`\\`js\n/**\n * Some text\n */\n\\`\\`\\`\n- \\`single\\` - Convert to single-line style\n\\`\\`\\`js\n/** Some text */\n\\`\\`\\`\n\nDefaults to \\`multi\\`.`,\n enum: [\n 'multi', 'single',\n ],\n type: 'string',\n },\n lineOrBlockStyle: {\n description: `What style of comments to which to apply JSDoc conversion.\n\n- \\`block\\` - Applies to block-style comments (\\`/* ... */\\`)\n- \\`line\\` - Applies to line-style comments (\\`// ...\\`)\n- \\`both\\` - Applies to both block and line-style comments\n\nDefaults to \\`both\\`.`,\n enum: [\n 'block', 'line', 'both',\n ],\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,aAA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EAAE;gBACR,CAAC;gBACDJ,kBAAkB,EAAE;kBAClBI,IAAI,EAAE;gBACR;cACF,CAAC;cACDA,IAAI,EAAE;YACR,CAAC;UAEL,CAAC;UACDA,IAAI,EAAE;QACR,CAAC;QACDlC,WAAW,EAAE;UACX6D,WAAW,EAAE,mCAAmC;UAChD3B,IAAI,EAAE;QACR,CAAC;QACDjC,qBAAqB,EAAE;UACrB4D,WAAW,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;UACXW,IAAI,EAAE,CACJ,OAAO,EAAE,QAAQ,CAClB;UACDtC,IAAI,EAAE;QACR,CAAC;QACDhC,gBAAgB,EAAE;UAChB2D,WAAW,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA,sBAAsB;UACVW,IAAI,EAAE,CACJ,OAAO,EAAE,MAAM,EAAE,MAAM,CACxB;UACDtC,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC;AAAAuC,MAAA,CAAArF,OAAA,GAAAA,OAAA,CAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"convertToJsdocComments.cjs","names":["_iterateJsdoc","require","_jsdocUtils","_jsdoccomment","_default","exports","default","create","context","sourceCode","getSourceCode","settings","getSettings","allowedPrefixes","contexts","contextsAfter","contextsBeforeAndAfter","enableFixer","enforceJsdocLineStyle","lineOrBlockStyle","options","reportingNonJsdoc","report","messageId","comment","node","fixer","loc","end","column","line","start","fix","getFixer","addComment","ctxts","lines","minLines","maxLines","baseNode","getReducedASTNode","decorator","getDecorator","indent","getIndent","text","getText","inlineCommentBlock","find","contxt","ctxt","type","reportings","checkNonJsdoc","_info","_handler","getNonJsdocComment","some","prefix","value","trimStart","startsWith","commentToAdd","insertion","trim","trimEnd","repeat","replaceText","checkNonJsdocAfter","getFollowingComment","slice","remove","insertTextBefore","parent","getContextObject","enforcedContexts","meta","docs","description","url","fixable","messages","blockCommentsJsdocStyle","lineCommentsJsdocStyle","schema","additionalProperties","properties","items","anyOf","enum","module"],"sources":["../../src/rules/convertToJsdocComments.js"],"sourcesContent":["import {\n getSettings,\n} from '../iterateJsdoc.js';\nimport {\n enforcedContexts,\n getContextObject,\n getIndent,\n} from '../jsdocUtils.js';\nimport {\n getDecorator,\n getFollowingComment,\n getNonJsdocComment,\n getReducedASTNode,\n} from '@es-joy/jsdoccomment';\n\n/** @type {import('eslint').Rule.RuleModule} */\nexport default {\n create (context) {\n /**\n * @typedef {import('eslint').AST.Token | import('estree').Comment | {\n * type: import('eslint').AST.TokenType|\"Line\"|\"Block\"|\"Shebang\",\n * range: [number, number],\n * value: string\n * }} Token\n */\n\n /**\n * @callback AddComment\n * @param {boolean|undefined} inlineCommentBlock\n * @param {Token} comment\n * @param {string} indent\n * @param {number} lines\n * @param {import('eslint').Rule.RuleFixer} fixer\n */\n\n /* c8 ignore next -- Fallback to deprecated method */\n const {\n sourceCode = context.getSourceCode(),\n } = context;\n const settings = getSettings(context);\n if (!settings) {\n return {};\n }\n\n const {\n allowedPrefixes = [\n '@ts-', 'istanbul ', 'c8 ', 'v8 ', 'eslint', 'prettier-',\n ],\n contexts = settings.contexts || [],\n contextsAfter = /** @type {string[]} */ ([]),\n contextsBeforeAndAfter = [\n 'VariableDeclarator', 'TSPropertySignature', 'PropertyDefinition',\n ],\n enableFixer = true,\n enforceJsdocLineStyle = 'multi',\n lineOrBlockStyle = 'both',\n } = context.options[0] ?? {};\n\n let reportingNonJsdoc = false;\n\n /**\n * @param {string} messageId\n * @param {import('estree').Comment|Token} comment\n * @param {import('eslint').Rule.Node} node\n * @param {import('eslint').Rule.ReportFixer} fixer\n */\n const report = (messageId, comment, node, fixer) => {\n const loc = {\n end: {\n column: 0,\n /* c8 ignore next 2 -- Guard */\n // @ts-expect-error Ok\n line: (comment.loc?.start?.line ?? 1),\n },\n start: {\n column: 0,\n /* c8 ignore next 2 -- Guard */\n // @ts-expect-error Ok\n line: (comment.loc?.start?.line ?? 1),\n },\n };\n\n context.report({\n fix: enableFixer ? fixer : null,\n loc,\n messageId,\n node,\n });\n };\n\n /**\n * @param {import('eslint').Rule.Node} node\n * @param {import('eslint').AST.Token | import('estree').Comment | {\n * type: import('eslint').AST.TokenType|\"Line\"|\"Block\"|\"Shebang\",\n * range: [number, number],\n * value: string\n * }} comment\n * @param {AddComment} addComment\n * @param {import('../iterateJsdoc.js').Context[]} ctxts\n */\n const getFixer = (node, comment, addComment, ctxts) => {\n return /** @type {import('eslint').Rule.ReportFixer} */ (fixer) => {\n // Default to one line break if the `minLines`/`maxLines` settings allow\n const lines = settings.minLines === 0 && settings.maxLines >= 1 ? 1 : settings.minLines;\n let baseNode =\n /**\n * @type {import('@typescript-eslint/types').TSESTree.Node|import('eslint').Rule.Node}\n */ (\n getReducedASTNode(node, sourceCode)\n );\n\n const decorator = getDecorator(\n /** @type {import('eslint').Rule.Node} */\n // @ts-expect-error Bug?\n (baseNode),\n );\n if (decorator) {\n baseNode = /** @type {import('@typescript-eslint/types').TSESTree.Decorator} */ (\n decorator\n );\n }\n\n const indent = getIndent({\n text: sourceCode.getText(\n /** @type {import('eslint').Rule.Node} */ (baseNode),\n /** @type {import('eslint').AST.SourceLocation} */\n (\n /** @type {import('eslint').Rule.Node} */ (baseNode).loc\n ).start.column,\n ),\n });\n\n const {\n inlineCommentBlock,\n } =\n /**\n * @type {{\n * context: string,\n * inlineCommentBlock: boolean,\n * minLineCount: import('../iterateJsdoc.js').Integer\n * }[]}\n */ (ctxts).find((contxt) => {\n if (typeof contxt === 'string') {\n return false;\n }\n\n const {\n context: ctxt,\n } = contxt;\n return ctxt === node.type;\n }) || {};\n\n return addComment(inlineCommentBlock, comment, indent, lines, fixer);\n };\n };\n\n /**\n * @param {import('eslint').AST.Token | import('estree').Comment | {\n * type: import('eslint').AST.TokenType|\"Line\"|\"Block\"|\"Shebang\",\n * range: [number, number],\n * value: string\n * }} comment\n * @param {import('eslint').Rule.Node} node\n * @param {AddComment} addComment\n * @param {import('../iterateJsdoc.js').Context[]} ctxts\n */\n const reportings = (comment, node, addComment, ctxts) => {\n const fixer = getFixer(node, comment, addComment, ctxts);\n\n if (comment.type === 'Block') {\n if (lineOrBlockStyle === 'line') {\n return;\n }\n\n report('blockCommentsJsdocStyle', comment, node, fixer);\n return;\n }\n\n if (comment.type === 'Line') {\n if (lineOrBlockStyle === 'block') {\n return;\n }\n\n report('lineCommentsJsdocStyle', comment, node, fixer);\n }\n };\n\n /**\n * @type {import('../iterateJsdoc.js').CheckJsdoc}\n */\n const checkNonJsdoc = (_info, _handler, node) => {\n const comment = getNonJsdocComment(sourceCode, node, settings);\n\n if (\n !comment ||\n /** @type {string[]} */\n (allowedPrefixes).some((prefix) => {\n return comment.value.trimStart().startsWith(prefix);\n })\n ) {\n return;\n }\n\n reportingNonJsdoc = true;\n\n /** @type {AddComment} */\n // eslint-disable-next-line unicorn/consistent-function-scoping -- Avoid conflicts\n const addComment = (inlineCommentBlock, commentToAdd, indent, lines, fixer) => {\n const insertion = (\n inlineCommentBlock || enforceJsdocLineStyle === 'single' ?\n `/** ${commentToAdd.value.trim()} ` :\n `/**\\n${indent}*${commentToAdd.value.trimEnd()}\\n${indent}`\n ) +\n `*/${'\\n'.repeat((lines || 1) - 1)}`;\n\n return fixer.replaceText(\n /** @type {import('eslint').AST.Token} */\n (commentToAdd),\n insertion,\n );\n };\n\n reportings(comment, node, addComment, contexts);\n };\n\n /**\n * @param {import('eslint').Rule.Node} node\n * @param {import('../iterateJsdoc.js').Context[]} ctxts\n */\n const checkNonJsdocAfter = (node, ctxts) => {\n const comment = getFollowingComment(sourceCode, node);\n\n if (\n !comment ||\n comment.value.startsWith('*') ||\n /** @type {string[]} */\n (allowedPrefixes).some((prefix) => {\n return comment.value.trimStart().startsWith(prefix);\n })\n ) {\n return;\n }\n\n /** @type {AddComment} */\n const addComment = (inlineCommentBlock, commentToAdd, indent, lines, fixer) => {\n const insertion = (\n inlineCommentBlock || enforceJsdocLineStyle === 'single' ?\n `/** ${commentToAdd.value.trim()} ` :\n `/**\\n${indent}*${commentToAdd.value.trimEnd()}\\n${indent}`\n ) +\n `*/${'\\n'.repeat((lines || 1) - 1)}${lines ? `\\n${indent.slice(1)}` : ' '}`;\n\n return [\n fixer.remove(\n /** @type {import('eslint').AST.Token} */\n (commentToAdd),\n ), fixer.insertTextBefore(\n node.type === 'VariableDeclarator' ? node.parent : node,\n insertion,\n ),\n ];\n };\n\n reportings(comment, node, addComment, ctxts);\n };\n\n // Todo: add contexts to check after (and handle if want both before and after)\n return {\n ...getContextObject(\n enforcedContexts(context, true, settings),\n checkNonJsdoc,\n ),\n ...getContextObject(\n contextsAfter,\n (_info, _handler, node) => {\n checkNonJsdocAfter(node, contextsAfter);\n },\n ),\n ...getContextObject(\n contextsBeforeAndAfter,\n (_info, _handler, node) => {\n checkNonJsdoc({}, null, node);\n if (!reportingNonJsdoc) {\n checkNonJsdocAfter(node, contextsBeforeAndAfter);\n }\n },\n ),\n };\n },\n meta: {\n docs: {\n description: 'Converts non-JSDoc comments preceding or following nodes into JSDoc ones',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/convert-to-jsdoc-comments.md#repos-sticky-header',\n },\n\n fixable: 'code',\n\n messages: {\n blockCommentsJsdocStyle: 'Block comments should be JSDoc-style.',\n lineCommentsJsdocStyle: 'Line comments should be JSDoc-style.',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n allowedPrefixes: {\n description: `An array of prefixes to allow at the beginning of a comment.\n\nDefaults to \\`['@ts-', 'istanbul ', 'c8 ', 'v8 ', 'eslint', 'prettier-']\\`.\n\nSupplying your own value overrides the defaults.`,\n items: {\n type: 'string',\n },\n type: 'array',\n },\n contexts: {\n description: `The contexts array which will be checked for preceding content.\n\nCan either be strings or an object with a \\`context\\` string and an optional, default \\`false\\` \\`inlineCommentBlock\\` boolean.\n\nDefaults to \\`ArrowFunctionExpression\\`, \\`FunctionDeclaration\\`,\n\\`FunctionExpression\\`, \\`TSDeclareFunction\\`.`,\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n context: {\n type: 'string',\n },\n inlineCommentBlock: {\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n contextsAfter: {\n description: `The contexts array which will be checked for content on the same line after.\n\nCan either be strings or an object with a \\`context\\` string and an optional, default \\`false\\` \\`inlineCommentBlock\\` boolean.\n\nDefaults to an empty array.`,\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n context: {\n type: 'string',\n },\n inlineCommentBlock: {\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n contextsBeforeAndAfter: {\n description: `The contexts array which will be checked for content before and on the same\nline after.\n\nCan either be strings or an object with a \\`context\\` string and an optional, default \\`false\\` \\`inlineCommentBlock\\` boolean.\n\nDefaults to \\`VariableDeclarator\\`, \\`TSPropertySignature\\`, \\`PropertyDefinition\\`.`,\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n context: {\n type: 'string',\n },\n inlineCommentBlock: {\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n enableFixer: {\n description: 'Set to `false` to disable fixing.',\n type: 'boolean',\n },\n enforceJsdocLineStyle: {\n description: `What policy to enforce on the conversion of non-JSDoc comments without\nline breaks. (Non-JSDoc (mulitline) comments with line breaks will always\nbe converted to \\`multi\\` style JSDoc comments.)\n\n- \\`multi\\` - Convert to multi-line style\n\\`\\`\\`js\n/**\n * Some text\n */\n\\`\\`\\`\n- \\`single\\` - Convert to single-line style\n\\`\\`\\`js\n/** Some text */\n\\`\\`\\`\n\nDefaults to \\`multi\\`.`,\n enum: [\n 'multi', 'single',\n ],\n type: 'string',\n },\n lineOrBlockStyle: {\n description: `What style of comments to which to apply JSDoc conversion.\n\n- \\`block\\` - Applies to block-style comments (\\`/* ... */\\`)\n- \\`line\\` - Applies to line-style comments (\\`// ...\\`)\n- \\`both\\` - Applies to both block and line-style comments\n\nDefaults to \\`both\\`.`,\n enum: [\n 'block', 'line', 'both',\n ],\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,aAAA,GAAAF,OAAA;AAOA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAC,OAAA,GACe;EACbC,MAAMA,CAAEC,OAAO,EAAE;IACf;AACJ;AACA;AACA;AACA;AACA;AACA;;IAEI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;IAEI;IACA,MAAM;MACJC,UAAU,GAAGD,OAAO,CAACE,aAAa,CAAC;IACrC,CAAC,GAAGF,OAAO;IACX,MAAMG,QAAQ,GAAG,IAAAC,yBAAW,EAACJ,OAAO,CAAC;IACrC,IAAI,CAACG,QAAQ,EAAE;MACb,OAAO,CAAC,CAAC;IACX;IAEA,MAAM;MACJE,eAAe,GAAG,CAChB,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,CACzD;MACDC,QAAQ,GAAGH,QAAQ,CAACG,QAAQ,IAAI,EAAE;MAClCC,aAAa,IAAG,uBAAyB,EAAE,CAAC;MAC5CC,sBAAsB,GAAG,CACvB,oBAAoB,EAAE,qBAAqB,EAAE,oBAAoB,CAClE;MACDC,WAAW,GAAG,IAAI;MAClBC,qBAAqB,GAAG,OAAO;MAC/BC,gBAAgB,GAAG;IACrB,CAAC,GAAGX,OAAO,CAACY,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAE5B,IAAIC,iBAAiB,GAAG,KAAK;;IAE7B;AACJ;AACA;AACA;AACA;AACA;IACI,MAAMC,MAAM,GAAGA,CAACC,SAAS,EAAEC,OAAO,EAAEC,IA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A,IAAI,EAAE;YACR,CAAC;UAEL,CAAC;UACDA,IAAI,EAAE;QACR,CAAC;QACDnC,sBAAsB,EAAE;UACtB8D,WAAW,EAAE;AACzB;AACA;AACA;AACA;AACA,qFAAqF;UACzES,KAAK,EAAE;YACLC,KAAK,EAAE,CACL;cACErC,IAAI,EAAE;YACR,CAAC,EACD;cACEkC,oBAAoB,EAAE,KAAK;cAC3BC,UAAU,EAAE;gBACV9E,OAAO,EAAE;kBACP2C,IAAI,EAAE;gBACR,CAAC;gBACDJ,kBAAkB,EAAE;kBAClBI,IAAI,EAAE;gBACR;cACF,CAAC;cACDA,IAAI,EAAE;YACR,CAAC;UAEL,CAAC;UACDA,IAAI,EAAE;QACR,CAAC;QACDlC,WAAW,EAAE;UACX6D,WAAW,EAAE,mCAAmC;UAChD3B,IAAI,EAAE;QACR,CAAC;QACDjC,qBAAqB,EAAE;UACrB4D,WAAW,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;UACXW,IAAI,EAAE,CACJ,OAAO,EAAE,QAAQ,CAClB;UACDtC,IAAI,EAAE;QACR,CAAC;QACDhC,gBAAgB,EAAE;UAChB2D,WAAW,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA,sBAAsB;UACVW,IAAI,EAAE,CACJ,OAAO,EAAE,MAAM,EAAE,MAAM,CACxB;UACDtC,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC;AAAAuC,MAAA,CAAArF,OAAA,GAAAA,OAAA,CAAAC,OAAA","ignoreList":[]}
@@ -1,153 +1,161 @@
1
1
  declare const _default: {
2
2
  create(context: import("eslint").Rule.RuleContext): {
3
- [x: string]: ((...args: any[]) => void) | ((codePath: import("eslint").Rule.CodePath, node: import("eslint").Rule.Node) => void) | ((segment: import("eslint").Rule.CodePathSegment, node: import("eslint").Rule.Node) => void) | ((fromSegment: import("eslint").Rule.CodePathSegment, toSegment: import("eslint").Rule.CodePathSegment, node: import("eslint").Rule.Node) => void) | ((node: import("eslint").Rule.Node) => void) | undefined;
3
+ [x: string]: (((node: import("eslint").AST.Program & {
4
+ parent: null;
5
+ }) => void) & ((node: import("eslint").AST.Program) => void)) | ((codePath: import("eslint").Rule.CodePath, node: import("eslint").Rule.Node) => void) | ((segment: import("eslint").Rule.CodePathSegment, node: import("eslint").Rule.Node) => void) | ((fromSegment: import("eslint").Rule.CodePathSegment, toSegment: import("eslint").Rule.CodePathSegment, node: import("eslint").Rule.Node) => void) | ((node: import("eslint").Rule.Node) => void) | ((node: import("estree").CatchClause & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ClassBody & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").Identifier & import("eslint").Rule.NodeParentExtension) => void) | ((node: (import("estree").SimpleLiteral & import("eslint").Rule.NodeParentExtension) | (import("estree").RegExpLiteral & import("eslint").Rule.NodeParentExtension) | (import("estree").BigIntLiteral & import("eslint").Rule.NodeParentExtension)) => void) | ((node: import("estree").MethodDefinition & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").PrivateIdentifier & import("eslint").Rule.NodeParentExtension) => void) | ((node: (import("estree").AssignmentProperty & import("eslint").Rule.NodeParentExtension) | (import("estree").Property & import("eslint").Rule.NodeParentExtension)) => void) | ((node: import("estree").PropertyDefinition & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").SpreadElement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").Super & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").SwitchCase & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").TemplateElement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").VariableDeclarator & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ArrayExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ArrowFunctionExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").AssignmentExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").AwaitExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").BinaryExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").SimpleCallExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ChainExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ClassExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ConditionalExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").FunctionExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ImportExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").LogicalExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").MemberExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").MetaProperty & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").NewExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ObjectExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").SequenceExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").TaggedTemplateExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").TemplateLiteral & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ThisExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").UnaryExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").UpdateExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").YieldExpression & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ClassDeclaration & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").FunctionDeclaration & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ImportDeclaration & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ExportNamedDeclaration & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ExportDefaultDeclaration & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ExportAllDeclaration & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ImportSpecifier & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ImportDefaultSpecifier & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ImportNamespaceSpecifier & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ExportSpecifier & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ObjectPattern & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ArrayPattern & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").RestElement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").AssignmentPattern & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ExpressionStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").BlockStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").StaticBlock & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").EmptyStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").DebuggerStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").WithStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ReturnStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").LabeledStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").BreakStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ContinueStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").IfStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").SwitchStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ThrowStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").TryStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").WhileStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").DoWhileStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ForStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ForInStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").ForOfStatement & import("eslint").Rule.NodeParentExtension) => void) | ((node: import("estree").VariableDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
4
6
  onCodePathStart?: ((codePath: import("eslint").Rule.CodePath, node: import("eslint").Rule.Node) => void) | undefined;
5
7
  onCodePathEnd?: ((codePath: import("eslint").Rule.CodePath, node: import("eslint").Rule.Node) => void) | undefined;
6
8
  onCodePathSegmentStart?: ((segment: import("eslint").Rule.CodePathSegment, node: import("eslint").Rule.Node) => void) | undefined;
7
9
  onCodePathSegmentEnd?: ((segment: import("eslint").Rule.CodePathSegment, node: import("eslint").Rule.Node) => void) | undefined;
10
+ onUnreachableCodePathSegmentStart?: ((segment: import("eslint").Rule.CodePathSegment, node: import("eslint").Rule.Node) => void) | undefined;
11
+ onUnreachableCodePathSegmentEnd?: ((segment: import("eslint").Rule.CodePathSegment, node: import("eslint").Rule.Node) => void) | undefined;
8
12
  onCodePathSegmentLoop?: ((fromSegment: import("eslint").Rule.CodePathSegment, toSegment: import("eslint").Rule.CodePathSegment, node: import("eslint").Rule.Node) => void) | undefined;
13
+ Program?: (((node: import("eslint").AST.Program & {
14
+ parent: null;
15
+ }) => void) & ((node: import("eslint").AST.Program) => void)) | undefined;
16
+ "Program:exit"?: (((node: import("eslint").AST.Program & {
17
+ parent: null;
18
+ }) => void) & ((node: import("eslint").AST.Program) => void)) | undefined;
19
+ Property?: ((node: (import("estree").AssignmentProperty & import("eslint").Rule.NodeParentExtension) | (import("estree").Property & import("eslint").Rule.NodeParentExtension)) => void) | undefined;
20
+ "Property:exit"?: ((node: (import("estree").AssignmentProperty & import("eslint").Rule.NodeParentExtension) | (import("estree").Property & import("eslint").Rule.NodeParentExtension)) => void) | undefined;
21
+ CatchClause?: ((node: import("estree").CatchClause & import("eslint").Rule.NodeParentExtension) => void) | undefined;
22
+ "CatchClause:exit"?: ((node: import("estree").CatchClause & import("eslint").Rule.NodeParentExtension) => void) | undefined;
23
+ ClassDeclaration?: ((node: import("estree").ClassDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
24
+ "ClassDeclaration:exit"?: ((node: import("estree").ClassDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
25
+ ClassExpression?: ((node: import("estree").ClassExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
26
+ "ClassExpression:exit"?: ((node: import("estree").ClassExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
27
+ ClassBody?: ((node: import("estree").ClassBody & import("eslint").Rule.NodeParentExtension) => void) | undefined;
28
+ "ClassBody:exit"?: ((node: import("estree").ClassBody & import("eslint").Rule.NodeParentExtension) => void) | undefined;
29
+ Identifier?: ((node: import("estree").Identifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
30
+ "Identifier:exit"?: ((node: import("estree").Identifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
31
+ Literal?: ((node: (import("estree").SimpleLiteral & import("eslint").Rule.NodeParentExtension) | (import("estree").RegExpLiteral & import("eslint").Rule.NodeParentExtension) | (import("estree").BigIntLiteral & import("eslint").Rule.NodeParentExtension)) => void) | undefined;
32
+ "Literal:exit"?: ((node: (import("estree").SimpleLiteral & import("eslint").Rule.NodeParentExtension) | (import("estree").RegExpLiteral & import("eslint").Rule.NodeParentExtension) | (import("estree").BigIntLiteral & import("eslint").Rule.NodeParentExtension)) => void) | undefined;
9
33
  ArrayExpression?: ((node: import("estree").ArrayExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
10
34
  "ArrayExpression:exit"?: ((node: import("estree").ArrayExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
11
- ArrayPattern?: ((node: import("estree").ArrayPattern & import("eslint").Rule.NodeParentExtension) => void) | undefined;
12
- "ArrayPattern:exit"?: ((node: import("estree").ArrayPattern & import("eslint").Rule.NodeParentExtension) => void) | undefined;
13
35
  ArrowFunctionExpression?: ((node: import("estree").ArrowFunctionExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
14
36
  "ArrowFunctionExpression:exit"?: ((node: import("estree").ArrowFunctionExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
15
37
  AssignmentExpression?: ((node: import("estree").AssignmentExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
16
38
  "AssignmentExpression:exit"?: ((node: import("estree").AssignmentExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
17
- AssignmentPattern?: ((node: import("estree").AssignmentPattern & import("eslint").Rule.NodeParentExtension) => void) | undefined;
18
- "AssignmentPattern:exit"?: ((node: import("estree").AssignmentPattern & import("eslint").Rule.NodeParentExtension) => void) | undefined;
19
39
  AwaitExpression?: ((node: import("estree").AwaitExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
20
40
  "AwaitExpression:exit"?: ((node: import("estree").AwaitExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
21
41
  BinaryExpression?: ((node: import("estree").BinaryExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
22
42
  "BinaryExpression:exit"?: ((node: import("estree").BinaryExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
23
- BlockStatement?: ((node: import("estree").BlockStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
24
- "BlockStatement:exit"?: ((node: import("estree").BlockStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
25
- BreakStatement?: ((node: import("estree").BreakStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
26
- "BreakStatement:exit"?: ((node: import("estree").BreakStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
27
- CallExpression?: ((node: import("estree").CallExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
28
- "CallExpression:exit"?: ((node: import("estree").CallExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
29
- CatchClause?: ((node: import("estree").CatchClause & import("eslint").Rule.NodeParentExtension) => void) | undefined;
30
- "CatchClause:exit"?: ((node: import("estree").CatchClause & import("eslint").Rule.NodeParentExtension) => void) | undefined;
43
+ CallExpression?: ((node: import("estree").SimpleCallExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
44
+ "CallExpression:exit"?: ((node: import("estree").SimpleCallExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
45
+ NewExpression?: ((node: import("estree").NewExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
46
+ "NewExpression:exit"?: ((node: import("estree").NewExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
31
47
  ChainExpression?: ((node: import("estree").ChainExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
32
48
  "ChainExpression:exit"?: ((node: import("estree").ChainExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
33
- ClassBody?: ((node: import("estree").ClassBody & import("eslint").Rule.NodeParentExtension) => void) | undefined;
34
- "ClassBody:exit"?: ((node: import("estree").ClassBody & import("eslint").Rule.NodeParentExtension) => void) | undefined;
35
- ClassDeclaration?: ((node: import("estree").ClassDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
36
- "ClassDeclaration:exit"?: ((node: import("estree").ClassDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
37
- ClassExpression?: ((node: import("estree").ClassExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
38
- "ClassExpression:exit"?: ((node: import("estree").ClassExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
39
49
  ConditionalExpression?: ((node: import("estree").ConditionalExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
40
50
  "ConditionalExpression:exit"?: ((node: import("estree").ConditionalExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
41
- ContinueStatement?: ((node: import("estree").ContinueStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
42
- "ContinueStatement:exit"?: ((node: import("estree").ContinueStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
43
- DebuggerStatement?: ((node: import("estree").DebuggerStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
44
- "DebuggerStatement:exit"?: ((node: import("estree").DebuggerStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
45
- DoWhileStatement?: ((node: import("estree").DoWhileStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
46
- "DoWhileStatement:exit"?: ((node: import("estree").DoWhileStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
47
- EmptyStatement?: ((node: import("estree").EmptyStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
48
- "EmptyStatement:exit"?: ((node: import("estree").EmptyStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
49
- ExportAllDeclaration?: ((node: import("estree").ExportAllDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
50
- "ExportAllDeclaration:exit"?: ((node: import("estree").ExportAllDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
51
- ExportDefaultDeclaration?: ((node: import("estree").ExportDefaultDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
52
- "ExportDefaultDeclaration:exit"?: ((node: import("estree").ExportDefaultDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
53
- ExportNamedDeclaration?: ((node: import("estree").ExportNamedDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
54
- "ExportNamedDeclaration:exit"?: ((node: import("estree").ExportNamedDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
55
- ExportSpecifier?: ((node: import("estree").ExportSpecifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
56
- "ExportSpecifier:exit"?: ((node: import("estree").ExportSpecifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
57
- ExpressionStatement?: ((node: import("estree").ExpressionStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
58
- "ExpressionStatement:exit"?: ((node: import("estree").ExpressionStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
59
- ForInStatement?: ((node: import("estree").ForInStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
60
- "ForInStatement:exit"?: ((node: import("estree").ForInStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
61
- ForOfStatement?: ((node: import("estree").ForOfStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
62
- "ForOfStatement:exit"?: ((node: import("estree").ForOfStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
63
- ForStatement?: ((node: import("estree").ForStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
64
- "ForStatement:exit"?: ((node: import("estree").ForStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
65
- FunctionDeclaration?: ((node: import("estree").FunctionDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
66
- "FunctionDeclaration:exit"?: ((node: import("estree").FunctionDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
67
51
  FunctionExpression?: ((node: import("estree").FunctionExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
68
52
  "FunctionExpression:exit"?: ((node: import("estree").FunctionExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
69
- Identifier?: ((node: import("estree").Identifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
70
- "Identifier:exit"?: ((node: import("estree").Identifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
71
- IfStatement?: ((node: import("estree").IfStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
72
- "IfStatement:exit"?: ((node: import("estree").IfStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
73
- ImportDeclaration?: ((node: import("estree").ImportDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
74
- "ImportDeclaration:exit"?: ((node: import("estree").ImportDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
75
- ImportDefaultSpecifier?: ((node: import("estree").ImportDefaultSpecifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
76
- "ImportDefaultSpecifier:exit"?: ((node: import("estree").ImportDefaultSpecifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
77
53
  ImportExpression?: ((node: import("estree").ImportExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
78
54
  "ImportExpression:exit"?: ((node: import("estree").ImportExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
79
- ImportNamespaceSpecifier?: ((node: import("estree").ImportNamespaceSpecifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
80
- "ImportNamespaceSpecifier:exit"?: ((node: import("estree").ImportNamespaceSpecifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
81
- ImportSpecifier?: ((node: import("estree").ImportSpecifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
82
- "ImportSpecifier:exit"?: ((node: import("estree").ImportSpecifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
83
- LabeledStatement?: ((node: import("estree").LabeledStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
84
- "LabeledStatement:exit"?: ((node: import("estree").LabeledStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
85
- Literal?: ((node: import("estree").Literal & import("eslint").Rule.NodeParentExtension) => void) | undefined;
86
- "Literal:exit"?: ((node: import("estree").Literal & import("eslint").Rule.NodeParentExtension) => void) | undefined;
87
55
  LogicalExpression?: ((node: import("estree").LogicalExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
88
56
  "LogicalExpression:exit"?: ((node: import("estree").LogicalExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
89
57
  MemberExpression?: ((node: import("estree").MemberExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
90
58
  "MemberExpression:exit"?: ((node: import("estree").MemberExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
91
59
  MetaProperty?: ((node: import("estree").MetaProperty & import("eslint").Rule.NodeParentExtension) => void) | undefined;
92
60
  "MetaProperty:exit"?: ((node: import("estree").MetaProperty & import("eslint").Rule.NodeParentExtension) => void) | undefined;
93
- MethodDefinition?: ((node: import("estree").MethodDefinition & import("eslint").Rule.NodeParentExtension) => void) | undefined;
94
- "MethodDefinition:exit"?: ((node: import("estree").MethodDefinition & import("eslint").Rule.NodeParentExtension) => void) | undefined;
95
- NewExpression?: ((node: import("estree").NewExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
96
- "NewExpression:exit"?: ((node: import("estree").NewExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
97
61
  ObjectExpression?: ((node: import("estree").ObjectExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
98
62
  "ObjectExpression:exit"?: ((node: import("estree").ObjectExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
63
+ SequenceExpression?: ((node: import("estree").SequenceExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
64
+ "SequenceExpression:exit"?: ((node: import("estree").SequenceExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
65
+ TaggedTemplateExpression?: ((node: import("estree").TaggedTemplateExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
66
+ "TaggedTemplateExpression:exit"?: ((node: import("estree").TaggedTemplateExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
67
+ TemplateLiteral?: ((node: import("estree").TemplateLiteral & import("eslint").Rule.NodeParentExtension) => void) | undefined;
68
+ "TemplateLiteral:exit"?: ((node: import("estree").TemplateLiteral & import("eslint").Rule.NodeParentExtension) => void) | undefined;
69
+ ThisExpression?: ((node: import("estree").ThisExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
70
+ "ThisExpression:exit"?: ((node: import("estree").ThisExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
71
+ UnaryExpression?: ((node: import("estree").UnaryExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
72
+ "UnaryExpression:exit"?: ((node: import("estree").UnaryExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
73
+ UpdateExpression?: ((node: import("estree").UpdateExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
74
+ "UpdateExpression:exit"?: ((node: import("estree").UpdateExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
75
+ YieldExpression?: ((node: import("estree").YieldExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
76
+ "YieldExpression:exit"?: ((node: import("estree").YieldExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
77
+ FunctionDeclaration?: ((node: import("estree").FunctionDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
78
+ "FunctionDeclaration:exit"?: ((node: import("estree").FunctionDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
79
+ MethodDefinition?: ((node: import("estree").MethodDefinition & import("eslint").Rule.NodeParentExtension) => void) | undefined;
80
+ "MethodDefinition:exit"?: ((node: import("estree").MethodDefinition & import("eslint").Rule.NodeParentExtension) => void) | undefined;
81
+ ImportDeclaration?: ((node: import("estree").ImportDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
82
+ "ImportDeclaration:exit"?: ((node: import("estree").ImportDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
83
+ ExportNamedDeclaration?: ((node: import("estree").ExportNamedDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
84
+ "ExportNamedDeclaration:exit"?: ((node: import("estree").ExportNamedDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
85
+ ExportDefaultDeclaration?: ((node: import("estree").ExportDefaultDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
86
+ "ExportDefaultDeclaration:exit"?: ((node: import("estree").ExportDefaultDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
87
+ ExportAllDeclaration?: ((node: import("estree").ExportAllDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
88
+ "ExportAllDeclaration:exit"?: ((node: import("estree").ExportAllDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
89
+ ImportSpecifier?: ((node: import("estree").ImportSpecifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
90
+ "ImportSpecifier:exit"?: ((node: import("estree").ImportSpecifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
91
+ ImportDefaultSpecifier?: ((node: import("estree").ImportDefaultSpecifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
92
+ "ImportDefaultSpecifier:exit"?: ((node: import("estree").ImportDefaultSpecifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
93
+ ImportNamespaceSpecifier?: ((node: import("estree").ImportNamespaceSpecifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
94
+ "ImportNamespaceSpecifier:exit"?: ((node: import("estree").ImportNamespaceSpecifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
95
+ ExportSpecifier?: ((node: import("estree").ExportSpecifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
96
+ "ExportSpecifier:exit"?: ((node: import("estree").ExportSpecifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
99
97
  ObjectPattern?: ((node: import("estree").ObjectPattern & import("eslint").Rule.NodeParentExtension) => void) | undefined;
100
98
  "ObjectPattern:exit"?: ((node: import("estree").ObjectPattern & import("eslint").Rule.NodeParentExtension) => void) | undefined;
99
+ ArrayPattern?: ((node: import("estree").ArrayPattern & import("eslint").Rule.NodeParentExtension) => void) | undefined;
100
+ "ArrayPattern:exit"?: ((node: import("estree").ArrayPattern & import("eslint").Rule.NodeParentExtension) => void) | undefined;
101
+ RestElement?: ((node: import("estree").RestElement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
102
+ "RestElement:exit"?: ((node: import("estree").RestElement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
103
+ AssignmentPattern?: ((node: import("estree").AssignmentPattern & import("eslint").Rule.NodeParentExtension) => void) | undefined;
104
+ "AssignmentPattern:exit"?: ((node: import("estree").AssignmentPattern & import("eslint").Rule.NodeParentExtension) => void) | undefined;
101
105
  PrivateIdentifier?: ((node: import("estree").PrivateIdentifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
102
106
  "PrivateIdentifier:exit"?: ((node: import("estree").PrivateIdentifier & import("eslint").Rule.NodeParentExtension) => void) | undefined;
103
- Program?: ((node: import("estree").Program) => void) | undefined;
104
- "Program:exit"?: ((node: import("estree").Program) => void) | undefined;
105
- Property?: ((node: import("estree").Property & import("eslint").Rule.NodeParentExtension) => void) | undefined;
106
- "Property:exit"?: ((node: import("estree").Property & import("eslint").Rule.NodeParentExtension) => void) | undefined;
107
107
  PropertyDefinition?: ((node: import("estree").PropertyDefinition & import("eslint").Rule.NodeParentExtension) => void) | undefined;
108
108
  "PropertyDefinition:exit"?: ((node: import("estree").PropertyDefinition & import("eslint").Rule.NodeParentExtension) => void) | undefined;
109
- RestElement?: ((node: import("estree").RestElement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
110
- "RestElement:exit"?: ((node: import("estree").RestElement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
111
- ReturnStatement?: ((node: import("estree").ReturnStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
112
- "ReturnStatement:exit"?: ((node: import("estree").ReturnStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
113
- SequenceExpression?: ((node: import("estree").SequenceExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
114
- "SequenceExpression:exit"?: ((node: import("estree").SequenceExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
115
109
  SpreadElement?: ((node: import("estree").SpreadElement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
116
110
  "SpreadElement:exit"?: ((node: import("estree").SpreadElement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
111
+ ExpressionStatement?: ((node: import("estree").ExpressionStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
112
+ "ExpressionStatement:exit"?: ((node: import("estree").ExpressionStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
113
+ BlockStatement?: ((node: import("estree").BlockStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
114
+ "BlockStatement:exit"?: ((node: import("estree").BlockStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
117
115
  StaticBlock?: ((node: import("estree").StaticBlock & import("eslint").Rule.NodeParentExtension) => void) | undefined;
118
116
  "StaticBlock:exit"?: ((node: import("estree").StaticBlock & import("eslint").Rule.NodeParentExtension) => void) | undefined;
119
- Super?: ((node: import("estree").Super & import("eslint").Rule.NodeParentExtension) => void) | undefined;
120
- "Super:exit"?: ((node: import("estree").Super & import("eslint").Rule.NodeParentExtension) => void) | undefined;
121
- SwitchCase?: ((node: import("estree").SwitchCase & import("eslint").Rule.NodeParentExtension) => void) | undefined;
122
- "SwitchCase:exit"?: ((node: import("estree").SwitchCase & import("eslint").Rule.NodeParentExtension) => void) | undefined;
117
+ EmptyStatement?: ((node: import("estree").EmptyStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
118
+ "EmptyStatement:exit"?: ((node: import("estree").EmptyStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
119
+ DebuggerStatement?: ((node: import("estree").DebuggerStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
120
+ "DebuggerStatement:exit"?: ((node: import("estree").DebuggerStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
121
+ WithStatement?: ((node: import("estree").WithStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
122
+ "WithStatement:exit"?: ((node: import("estree").WithStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
123
+ ReturnStatement?: ((node: import("estree").ReturnStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
124
+ "ReturnStatement:exit"?: ((node: import("estree").ReturnStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
125
+ LabeledStatement?: ((node: import("estree").LabeledStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
126
+ "LabeledStatement:exit"?: ((node: import("estree").LabeledStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
127
+ BreakStatement?: ((node: import("estree").BreakStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
128
+ "BreakStatement:exit"?: ((node: import("estree").BreakStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
129
+ ContinueStatement?: ((node: import("estree").ContinueStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
130
+ "ContinueStatement:exit"?: ((node: import("estree").ContinueStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
131
+ IfStatement?: ((node: import("estree").IfStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
132
+ "IfStatement:exit"?: ((node: import("estree").IfStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
123
133
  SwitchStatement?: ((node: import("estree").SwitchStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
124
134
  "SwitchStatement:exit"?: ((node: import("estree").SwitchStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
125
- TaggedTemplateExpression?: ((node: import("estree").TaggedTemplateExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
126
- "TaggedTemplateExpression:exit"?: ((node: import("estree").TaggedTemplateExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
127
- TemplateElement?: ((node: import("estree").TemplateElement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
128
- "TemplateElement:exit"?: ((node: import("estree").TemplateElement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
129
- TemplateLiteral?: ((node: import("estree").TemplateLiteral & import("eslint").Rule.NodeParentExtension) => void) | undefined;
130
- "TemplateLiteral:exit"?: ((node: import("estree").TemplateLiteral & import("eslint").Rule.NodeParentExtension) => void) | undefined;
131
- ThisExpression?: ((node: import("estree").ThisExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
132
- "ThisExpression:exit"?: ((node: import("estree").ThisExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
133
135
  ThrowStatement?: ((node: import("estree").ThrowStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
134
136
  "ThrowStatement:exit"?: ((node: import("estree").ThrowStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
135
137
  TryStatement?: ((node: import("estree").TryStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
136
138
  "TryStatement:exit"?: ((node: import("estree").TryStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
137
- UnaryExpression?: ((node: import("estree").UnaryExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
138
- "UnaryExpression:exit"?: ((node: import("estree").UnaryExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
139
- UpdateExpression?: ((node: import("estree").UpdateExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
140
- "UpdateExpression:exit"?: ((node: import("estree").UpdateExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
139
+ WhileStatement?: ((node: import("estree").WhileStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
140
+ "WhileStatement:exit"?: ((node: import("estree").WhileStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
141
+ DoWhileStatement?: ((node: import("estree").DoWhileStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
142
+ "DoWhileStatement:exit"?: ((node: import("estree").DoWhileStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
143
+ ForStatement?: ((node: import("estree").ForStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
144
+ "ForStatement:exit"?: ((node: import("estree").ForStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
145
+ ForInStatement?: ((node: import("estree").ForInStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
146
+ "ForInStatement:exit"?: ((node: import("estree").ForInStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
147
+ ForOfStatement?: ((node: import("estree").ForOfStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
148
+ "ForOfStatement:exit"?: ((node: import("estree").ForOfStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
141
149
  VariableDeclaration?: ((node: import("estree").VariableDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
142
150
  "VariableDeclaration:exit"?: ((node: import("estree").VariableDeclaration & import("eslint").Rule.NodeParentExtension) => void) | undefined;
151
+ Super?: ((node: import("estree").Super & import("eslint").Rule.NodeParentExtension) => void) | undefined;
152
+ "Super:exit"?: ((node: import("estree").Super & import("eslint").Rule.NodeParentExtension) => void) | undefined;
153
+ SwitchCase?: ((node: import("estree").SwitchCase & import("eslint").Rule.NodeParentExtension) => void) | undefined;
154
+ "SwitchCase:exit"?: ((node: import("estree").SwitchCase & import("eslint").Rule.NodeParentExtension) => void) | undefined;
155
+ TemplateElement?: ((node: import("estree").TemplateElement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
156
+ "TemplateElement:exit"?: ((node: import("estree").TemplateElement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
143
157
  VariableDeclarator?: ((node: import("estree").VariableDeclarator & import("eslint").Rule.NodeParentExtension) => void) | undefined;
144
158
  "VariableDeclarator:exit"?: ((node: import("estree").VariableDeclarator & import("eslint").Rule.NodeParentExtension) => void) | undefined;
145
- WhileStatement?: ((node: import("estree").WhileStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
146
- "WhileStatement:exit"?: ((node: import("estree").WhileStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
147
- WithStatement?: ((node: import("estree").WithStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
148
- "WithStatement:exit"?: ((node: import("estree").WithStatement & import("eslint").Rule.NodeParentExtension) => void) | undefined;
149
- YieldExpression?: ((node: import("estree").YieldExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
150
- "YieldExpression:exit"?: ((node: import("estree").YieldExpression & import("eslint").Rule.NodeParentExtension) => void) | undefined;
151
159
  };
152
160
  meta: {
153
161
  docs: {
@@ -1,3 +1,3 @@
1
- declare const _default: import("@eslint/core").RuleDefinition<import("@eslint/core").RuleDefinitionTypeOptions>;
1
+ declare const _default: import("eslint").Rule.RuleModule;
2
2
  export default _default;
3
3
  //# sourceMappingURL=noRestrictedSyntax.d.ts.map
@@ -319,6 +319,15 @@ var _default = exports.default = (0, _iterateJsdoc.default)(({
319
319
  }) => {
320
320
  return utils.isNamepathOrUrlReferencingTag(tag);
321
321
  }).map(tagToParsedType('namepathOrURL'));
322
+ const definedNamesAndNamepaths = new Set(utils.filterTags(({
323
+ tag
324
+ }) => {
325
+ return utils.isNameOrNamepathDefiningTag(tag);
326
+ }).map(({
327
+ name
328
+ }) => {
329
+ return name;
330
+ }));
322
331
  const tagsWithTypes = /** @type {TypeAndTagInfo[]} */[...typeTags, ...namepathReferencingTags, ...namepathOrUrlReferencingTags
323
332
  // Remove types which failed to parse
324
333
  ].filter(Boolean);
@@ -360,7 +369,7 @@ var _default = exports.default = (0, _iterateJsdoc.default)(({
360
369
  } while (currNode?.type === 'JsdocTypeNamePath');
361
370
  if (type === 'JsdocTypeName') {
362
371
  const structuredTypes = structuredTags[tag.tag]?.type;
363
- if (!allDefinedTypes.has(val) && (!Array.isArray(structuredTypes) || !structuredTypes.includes(val))) {
372
+ if (!allDefinedTypes.has(val) && !definedNamesAndNamepaths.has(val) && (!Array.isArray(structuredTypes) || !structuredTypes.includes(val))) {
364
373
  const parent =
365
374
  /**
366
375
  * @type {import('jsdoc-type-pratt-parser').RootResult & {