eslint-plugin-jsdoc 61.1.10 → 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 +24 -15
  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 +23 -14
@@ -27,9 +27,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
27
27
  * schema?: import('eslint').Rule.RuleMetaData['schema']
28
28
  * url?: string,
29
29
  * }} cfg
30
- * @returns {import('@eslint/core').RuleDefinition<
31
- * import('@eslint/core').RuleDefinitionTypeOptions
32
- * >}
30
+ * @returns {import('eslint').Rule.RuleModule}
33
31
  */
34
32
  const buildForbidRuleDefinition = ({
35
33
  contextName,
@@ -1 +1 @@
1
- {"version":3,"file":"buildForbidRuleDefinition.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","buildForbidRuleDefinition","contextName","contexts","cntxts","description","getContexts","modifyContext","schema","url","iterateJsdoc","context","info","comment","report","utils","contextStr","foundContext","findContext","message","contextSelected","meta","docs","type","undefined","propertyDescriptors","Object","getOwnPropertyDescriptors","create","getPrototypeOf","options","value","nonGlobalSettings","exports"],"sources":["../src/buildForbidRuleDefinition.js"],"sourcesContent":["import iterateJsdoc from './iterateJsdoc.js';\n\n/**\n * @typedef {(string|{\n * comment: string,\n * context: string,\n * message?: string\n * })[]} Contexts\n */\n\n/**\n * @param {{\n * contexts?: Contexts,\n * description?: string,\n * getContexts?: (\n * ctxt: import('eslint').Rule.RuleContext,\n * report: import('./iterateJsdoc.js').Report\n * ) => Contexts|false,\n * contextName?: string,\n * modifyContext?: (context: import('eslint').Rule.RuleContext) => import('eslint').Rule.RuleContext,\n * schema?: import('eslint').Rule.RuleMetaData['schema']\n * url?: string,\n * }} cfg\n * @returns {import('@eslint/core').RuleDefinition<\n * import('@eslint/core').RuleDefinitionTypeOptions\n * >}\n */\nexport const buildForbidRuleDefinition = ({\n contextName,\n contexts: cntxts,\n description,\n getContexts,\n modifyContext,\n schema,\n url,\n}) => {\n return iterateJsdoc(({\n context,\n info: {\n comment,\n },\n report,\n utils,\n }) => {\n /** @type {Contexts|boolean|undefined} */\n let contexts = cntxts;\n\n if (getContexts) {\n contexts = getContexts(context, report);\n if (!contexts) {\n return;\n }\n }\n\n const {\n contextStr,\n foundContext,\n } = utils.findContext(/** @type {Contexts} */ (contexts), comment);\n\n // We are not on the *particular* matching context/comment, so don't assume\n // we need reporting\n if (!foundContext) {\n return;\n }\n\n const message = /** @type {import('./iterateJsdoc.js').ContextObject} */ (\n foundContext\n )?.message ??\n 'Syntax is restricted: {{context}}' +\n (comment ? ' with {{comment}}' : '');\n\n report(message, null, null, comment ? {\n comment,\n context: contextStr,\n } : {\n context: contextStr,\n });\n }, {\n contextSelected: true,\n meta: {\n docs: {\n description: description ?? contextName ?? 'Reports when certain comment structures are present.',\n url: url ?? 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/advanced.md#user-content-advanced-creating-your-own-rules',\n },\n schema: schema ?? [],\n type: 'suggestion',\n },\n modifyContext: modifyContext ?? (getContexts ? undefined : (context) => {\n // Reproduce context object with our own `contexts`\n const propertyDescriptors = Object.getOwnPropertyDescriptors(context);\n return Object.create(\n Object.getPrototypeOf(context),\n {\n ...propertyDescriptors,\n options: {\n ...propertyDescriptors.options,\n value: [\n {\n contexts: cntxts,\n },\n ],\n },\n },\n );\n }),\n nonGlobalSettings: true,\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6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EA,GAAG,IAAI;MACd,CAAC;MACDD,MAAM,EAAEA,MAAM,IAAI,EAAE;MACpBe,IAAI,EAAE;IACR,CAAC;IACDhB,aAAa,EAAEA,aAAa,KAAKD,WAAW,GAAGkB,SAAS,GAAIb,OAAO,IAAK;MACtE;MACA,MAAMc,mBAAmB,GAAGC,MAAM,CAACC,yBAAyB,CAAChB,OAAO,CAAC;MACrE,OAAOe,MAAM,CAACE,MAAM,CAClBF,MAAM,CAACG,cAAc,CAAClB,OAAO,CAAC,EAC9B;QACE,GAAGc,mBAAmB;QACtBK,OAAO,EAAE;UACP,GAAGL,mBAAmB,CAACK,OAAO;UAC9BC,KAAK,EAAE,CACL;YACE5B,QAAQ,EAAEC;UACZ,CAAC;QAEL;MACF,CACF,CAAC;IACH,CAAC,CAAC;IACF4B,iBAAiB,EAAE;EACrB,CAAC,CAAC;AACJ,CAAC;AAACC,OAAA,CAAAhC,yBAAA,GAAAA,yBAAA","ignoreList":[]}
1
+ {"version":3,"file":"buildForbidRuleDefinition.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","buildForbidRuleDefinition","contextName","contexts","cntxts","description","getContexts","modifyContext","schema","url","iterateJsdoc","context","info","comment","report","utils","contextStr","foundContext","findContext","message","contextSelected","meta","docs","type","undefined","propertyDescriptors","Object","getOwnPropertyDescriptors","create","getPrototypeOf","options","value","nonGlobalSettings","exports"],"sources":["../src/buildForbidRuleDefinition.js"],"sourcesContent":["import iterateJsdoc from './iterateJsdoc.js';\n\n/**\n * @typedef {(string|{\n * comment: string,\n * context: string,\n * message?: string\n * })[]} Contexts\n */\n\n/**\n * @param {{\n * contexts?: Contexts,\n * description?: string,\n * getContexts?: (\n * ctxt: import('eslint').Rule.RuleContext,\n * report: import('./iterateJsdoc.js').Report\n * ) => Contexts|false,\n * contextName?: string,\n * modifyContext?: (context: import('eslint').Rule.RuleContext) => import('eslint').Rule.RuleContext,\n * schema?: import('eslint').Rule.RuleMetaData['schema']\n * url?: string,\n * }} cfg\n * @returns {import('eslint').Rule.RuleModule}\n */\nexport const buildForbidRuleDefinition = ({\n contextName,\n contexts: cntxts,\n description,\n getContexts,\n modifyContext,\n schema,\n url,\n}) => {\n return iterateJsdoc(({\n context,\n info: {\n comment,\n },\n report,\n utils,\n }) => {\n /** @type {Contexts|boolean|undefined} */\n let contexts = cntxts;\n\n if (getContexts) {\n contexts = getContexts(context, report);\n if (!contexts) {\n return;\n }\n }\n\n const {\n contextStr,\n foundContext,\n } = utils.findContext(/** @type {Contexts} */ (contexts), comment);\n\n // We are not on the *particular* matching context/comment, so don't assume\n // we need reporting\n if (!foundContext) {\n return;\n }\n\n const message = /** @type {import('./iterateJsdoc.js').ContextObject} */ (\n foundContext\n )?.message ??\n 'Syntax is restricted: {{context}}' +\n (comment ? ' with {{comment}}' : '');\n\n report(message, null, null, comment ? {\n comment,\n context: contextStr,\n } : {\n context: contextStr,\n });\n }, {\n contextSelected: true,\n meta: {\n docs: {\n description: description ?? contextName ?? 'Reports when certain comment structures are present.',\n url: url ?? 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/advanced.md#user-content-advanced-creating-your-own-rules',\n },\n schema: schema ?? [],\n type: 'suggestion',\n },\n modifyContext: modifyContext ?? (getContexts ? undefined : (context) => {\n // Reproduce context object with our own `contexts`\n const propertyDescriptors = Object.getOwnPropertyDescriptors(context);\n return Object.create(\n Object.getPrototypeOf(context),\n {\n ...propertyDescriptors,\n options: {\n ...propertyDescriptors.options,\n value: [\n {\n contexts: cntxts,\n },\n ],\n },\n },\n );\n }),\n nonGlobalSettings: true,\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AAmB,GAAGC,MAAM,CAACC,yBAAyB,CAAChB,OAAO,CAAC;MACrE,OAAOe,MAAM,CAACE,MAAM,CAClBF,MAAM,CAACG,cAAc,CAAClB,OAAO,CAAC,EAC9B;QACE,GAAGc,mBAAmB;QACtBK,OAAO,EAAE;UACP,GAAGL,mBAAmB,CAACK,OAAO;UAC9BC,KAAK,EAAE,CACL;YACE5B,QAAQ,EAAEC;UACZ,CAAC;QAEL;MACF,CACF,CAAC;IACH,CAAC,CAAC;IACF4B,iBAAiB,EAAE;EACrB,CAAC,CAAC;AACJ,CAAC;AAACC,OAAA,CAAAhC,yBAAA,GAAAA,yBAAA","ignoreList":[]}
@@ -6,7 +6,7 @@ export function buildForbidRuleDefinition({ contextName, contexts: cntxts, descr
6
6
  modifyContext?: (context: import("eslint").Rule.RuleContext) => import("eslint").Rule.RuleContext;
7
7
  schema?: import("eslint").Rule.RuleMetaData["schema"];
8
8
  url?: string;
9
- }): import("@eslint/core").RuleDefinition<import("@eslint/core").RuleDefinitionTypeOptions>;
9
+ }): import("eslint").Rule.RuleModule;
10
10
  export type Contexts = (string | {
11
11
  comment: string;
12
12
  context: string;
@@ -96,9 +96,7 @@ const infoUC = {
96
96
  * typeName?: string,
97
97
  * url?: string,
98
98
  * }} cfg
99
- * @returns {import('@eslint/core').RuleDefinition<
100
- * import('@eslint/core').RuleDefinitionTypeOptions
101
- * >}
99
+ * @returns {import('eslint').Rule.RuleModule}
102
100
  */
103
101
  const buildRejectOrPreferRuleDefinition = ({
104
102
  checkNativeTypes = null,
@@ -1 +1 @@
1
- {"version":3,"file":"buildRejectOrPreferRuleDefinition.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","_jsdoccomment","e","__esModule","default","adjustNames","type","preferred","isGenericMatch","typeNodeName","node","parentNode","ret","parentMeta","meta","brackets","dot","dotBracketEnd","match","slice","length","bracketEnd","endsWith","value","replace","getMessage","upperCase","info","message","replacement","infoUC","buildRejectOrPreferRuleDefinition","checkNativeTypes","typeName","description","overrideSettings","schema","url","iterateJsdoc","context","jsdocNode","report","settings","sourceCode","utils","jsdocTagsWithPossibleType","filterTags","tag","Boolean","tagMightHaveTypePosition","mode","preferredTypes","preferredTypesOriginal","structuredTags","injectObjectPreferredTypes","typeToInject","Object","exemptTagContexts","noDefaults","unifyParentAndChildTypeChecks","options","getPreferredTypeInfo","_type","property","hasMatchingPreferredType","typName","isNameOfGeneric","undefined","checkPostFixes","some","checkPostFix","preferredType","prefType","directNameMatch","values","includes","specificUnify","unifiedSyntaxParentMatch","getInvalidTypes","tagName","nameInTag","idx","invalidTypes","types","preferredSetting","push","nextItem","skipRootChecking","name","startsWith","reportSettings","entries","typs","Array","isArray","jsdocTag","typeAst","tryParse","parse","traverse","fixedType","stringify","fix","fixer","replaceText","getText","badType","msg","tagValue","JSON","iterateAllJsdocs","docs","os","fixable","exports"],"sources":["../src/buildRejectOrPreferRuleDefinition.js"],"sourcesContent":["import iterateJsdoc from './iterateJsdoc.js';\nimport {\n parse,\n stringify,\n traverse,\n tryParse,\n} from '@es-joy/jsdoccomment';\n\n/**\n * Adjusts the parent type node `meta` for generic matches (or type node\n * `type` for `JsdocTypeAny`) and sets the type node `value`.\n * @param {string} type The actual type\n * @param {string} preferred The preferred type\n * @param {boolean} isGenericMatch\n * @param {string} typeNodeName\n * @param {import('jsdoc-type-pratt-parser').NonRootResult} node\n * @param {import('jsdoc-type-pratt-parser').NonRootResult|undefined} parentNode\n * @returns {void}\n */\nconst adjustNames = (type, preferred, isGenericMatch, typeNodeName, node, parentNode) => {\n let ret = preferred;\n if (isGenericMatch) {\n const parentMeta = /** @type {import('jsdoc-type-pratt-parser').GenericResult} */ (\n parentNode\n ).meta;\n if (preferred === '[]') {\n parentMeta.brackets = 'square';\n parentMeta.dot = false;\n ret = 'Array';\n } else {\n const dotBracketEnd = preferred.match(/\\.(?:<>)?$/v);\n if (dotBracketEnd) {\n parentMeta.brackets = 'angle';\n parentMeta.dot = true;\n ret = preferred.slice(0, -dotBracketEnd[0].length);\n } else {\n const bracketEnd = preferred.endsWith('<>');\n if (bracketEnd) {\n parentMeta.brackets = 'angle';\n parentMeta.dot = false;\n ret = preferred.slice(0, -2);\n } else if (\n parentMeta?.brackets === 'square' &&\n (typeNodeName === '[]' || typeNodeName === 'Array')\n ) {\n parentMeta.brackets = 'angle';\n parentMeta.dot = false;\n }\n }\n }\n } else if (type === 'JsdocTypeAny') {\n node.type = 'JsdocTypeName';\n }\n\n /** @type {import('jsdoc-type-pratt-parser').NameResult} */ (\n node\n ).value = ret.replace(/(?:\\.|<>|\\.<>|\\[\\])$/v, '');\n\n // For bare pseudo-types like `<>`\n if (!ret) {\n /** @type {import('jsdoc-type-pratt-parser').NameResult} */ (\n node\n ).value = typeNodeName;\n }\n};\n\n/**\n * @param {boolean} [upperCase]\n * @returns {string}\n */\nconst getMessage = (upperCase) => {\n return 'Use object shorthand or index signatures instead of ' +\n '`' + (upperCase ? 'O' : 'o') + 'bject`, e.g., `{[key: string]: string}`';\n};\n\n/**\n * @type {{\n * message: string,\n * replacement: false\n * }}\n */\nconst info = {\n message: getMessage(),\n replacement: false,\n};\n\n/**\n * @type {{\n * message: string,\n * replacement: false\n * }}\n */\nconst infoUC = {\n message: getMessage(true),\n replacement: false,\n};\n\n/**\n * @param {{\n * checkNativeTypes?: import('./rules/checkTypes.js').CheckNativeTypes|null\n * overrideSettings?: import('./iterateJsdoc.js').Settings['preferredTypes']|null,\n * description?: string,\n * schema?: import('eslint').Rule.RuleMetaData['schema'],\n * typeName?: string,\n * url?: string,\n * }} cfg\n * @returns {import('@eslint/core').RuleDefinition<\n * import('@eslint/core').RuleDefinitionTypeOptions\n * >}\n */\nexport const buildRejectOrPreferRuleDefinition = ({\n checkNativeTypes = null,\n typeName,\n description = typeName ?? 'Reports types deemed invalid (customizable and with defaults, for preventing and/or recommending replacements).',\n overrideSettings = null,\n schema = [],\n url = 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-types.md#repos-sticky-header',\n}) => {\n return iterateJsdoc(\n ({\n context,\n jsdocNode,\n report,\n settings,\n sourceCode,\n utils,\n }) => {\n const jsdocTagsWithPossibleType = utils.filterTags((tag) => {\n return Boolean(utils.tagMightHaveTypePosition(tag.tag));\n });\n\n const\n /**\n * @type {{\n * preferredTypes: import('./iterateJsdoc.js').PreferredTypes,\n * structuredTags: import('./iterateJsdoc.js').StructuredTags,\n * mode: import('./jsdocUtils.js').ParserMode\n * }}\n */\n {\n mode,\n preferredTypes: preferredTypesOriginal,\n structuredTags,\n } = overrideSettings ? {\n mode: settings.mode,\n preferredTypes: overrideSettings,\n structuredTags: {},\n } : settings;\n\n const injectObjectPreferredTypes = !overrideSettings &&\n !('Object' in preferredTypesOriginal ||\n 'object' in preferredTypesOriginal ||\n 'object.<>' in preferredTypesOriginal ||\n 'Object.<>' in preferredTypesOriginal ||\n 'object<>' in preferredTypesOriginal);\n\n /** @type {import('./iterateJsdoc.js').PreferredTypes} */\n const typeToInject = mode === 'typescript' ?\n {\n Object: 'object',\n 'object.<>': info,\n 'Object.<>': infoUC,\n 'object<>': info,\n 'Object<>': infoUC,\n } :\n {\n Object: 'object',\n 'object.<>': 'Object<>',\n 'Object.<>': 'Object<>',\n 'object<>': 'Object<>',\n };\n\n /** @type {import('./iterateJsdoc.js').PreferredTypes} */\n const preferredTypes = {\n ...injectObjectPreferredTypes ?\n typeToInject :\n {},\n ...preferredTypesOriginal,\n };\n\n const\n /**\n * @type {{\n * noDefaults: boolean,\n * unifyParentAndChildTypeChecks: boolean,\n * exemptTagContexts: ({\n * tag: string,\n * types: true|string[]\n * })[]\n * }}\n */ {\n exemptTagContexts = [],\n noDefaults,\n unifyParentAndChildTypeChecks,\n } = context.options[0] || {};\n\n /**\n * Gets information about the preferred type: whether there is a matching\n * preferred type, what the type is, and whether it is a match to a generic.\n * @param {string} _type Not currently in use\n * @param {string} typeNodeName\n * @param {import('jsdoc-type-pratt-parser').NonRootResult|undefined} parentNode\n * @param {string|undefined} property\n * @returns {[hasMatchingPreferredType: boolean, typeName: string, isGenericMatch: boolean]}\n */\n const getPreferredTypeInfo = (_type, typeNodeName, parentNode, property) => {\n let hasMatchingPreferredType = false;\n let isGenericMatch = false;\n let typName = typeNodeName;\n\n const isNameOfGeneric = parentNode !== undefined && parentNode.type === 'JsdocTypeGeneric' && property === 'left';\n\n const brackets = /** @type {import('jsdoc-type-pratt-parser').GenericResult} */ (\n parentNode\n )?.meta?.brackets;\n const dot = /** @type {import('jsdoc-type-pratt-parser').GenericResult} */ (\n parentNode\n )?.meta?.dot;\n\n if (brackets === 'angle') {\n const checkPostFixes = dot ? [\n '.', '.<>',\n ] : [\n '<>',\n ];\n isGenericMatch = checkPostFixes.some((checkPostFix) => {\n const preferredType = preferredTypes?.[typeNodeName + checkPostFix];\n\n // Does `unifyParentAndChildTypeChecks` need to be checked here?\n if (\n (unifyParentAndChildTypeChecks || isNameOfGeneric ||\n /* c8 ignore next 2 -- If checking `unifyParentAndChildTypeChecks` */\n (typeof preferredType === 'object' &&\n preferredType?.unifyParentAndChildTypeChecks)\n ) &&\n preferredType !== undefined\n ) {\n typName += checkPostFix;\n\n return true;\n }\n\n return false;\n });\n }\n\n if (\n !isGenericMatch && property &&\n /** @type {import('jsdoc-type-pratt-parser').NonRootResult} */ (\n parentNode\n ).type === 'JsdocTypeGeneric'\n ) {\n const checkPostFixes = dot ? [\n '.', '.<>',\n ] : [\n brackets === 'angle' ? '<>' : '[]',\n ];\n\n isGenericMatch = checkPostFixes.some((checkPostFix) => {\n const preferredType = preferredTypes?.[checkPostFix];\n if (\n // Does `unifyParentAndChildTypeChecks` need to be checked here?\n (unifyParentAndChildTypeChecks || isNameOfGeneric ||\n /* c8 ignore next 2 -- If checking `unifyParentAndChildTypeChecks` */\n (typeof preferredType === 'object' &&\n preferredType?.unifyParentAndChildTypeChecks)) &&\n preferredType !== undefined\n ) {\n typName = checkPostFix;\n\n return true;\n }\n\n return false;\n });\n }\n\n const prefType = preferredTypes?.[typeNodeName];\n const directNameMatch = prefType !== undefined &&\n !Object.values(preferredTypes).includes(typeNodeName);\n const specificUnify = typeof prefType === 'object' &&\n prefType?.unifyParentAndChildTypeChecks;\n const unifiedSyntaxParentMatch = property && directNameMatch && (unifyParentAndChildTypeChecks || specificUnify);\n isGenericMatch = isGenericMatch || Boolean(unifiedSyntaxParentMatch);\n\n hasMatchingPreferredType = isGenericMatch ||\n directNameMatch && !property;\n\n return [\n hasMatchingPreferredType, typName, isGenericMatch,\n ];\n };\n\n /**\n * Collect invalid type info.\n * @param {string} type\n * @param {string} value\n * @param {string} tagName\n * @param {string} nameInTag\n * @param {number} idx\n * @param {string|undefined} property\n * @param {import('jsdoc-type-pratt-parser').NonRootResult} node\n * @param {import('jsdoc-type-pratt-parser').NonRootResult|undefined} parentNode\n * @param {(string|false|undefined)[][]} invalidTypes\n * @returns {void}\n */\n const getInvalidTypes = (type, value, tagName, nameInTag, idx, property, node, parentNode, invalidTypes) => {\n let typeNodeName = type === 'JsdocTypeAny' ? '*' : value;\n\n const [\n hasMatchingPreferredType,\n typName,\n isGenericMatch,\n ] = getPreferredTypeInfo(type, typeNodeName, parentNode, property);\n\n let preferred;\n let types;\n if (hasMatchingPreferredType) {\n const preferredSetting = preferredTypes[typName];\n typeNodeName = typName === '[]' ? typName : typeNodeName;\n\n if (!preferredSetting) {\n invalidTypes.push([\n typeNodeName,\n ]);\n } else if (typeof preferredSetting === 'string') {\n preferred = preferredSetting;\n invalidTypes.push([\n typeNodeName, preferred,\n ]);\n } else if (preferredSetting && typeof preferredSetting === 'object') {\n const nextItem = preferredSetting.skipRootChecking && jsdocTagsWithPossibleType[idx + 1];\n\n if (!nextItem || !nextItem.name.startsWith(`${nameInTag}.`)) {\n preferred = preferredSetting.replacement;\n invalidTypes.push([\n typeNodeName,\n preferred,\n preferredSetting.message,\n ]);\n }\n } else {\n utils.reportSettings(\n 'Invalid `settings.jsdoc.preferredTypes`. Values must be falsy, a string, or an object.',\n );\n\n return;\n }\n } else if (Object.entries(structuredTags).some(([\n tag,\n {\n type: typs,\n },\n ]) => {\n types = typs;\n\n return tag === tagName &&\n Array.isArray(types) &&\n !types.includes(typeNodeName);\n })) {\n invalidTypes.push([\n typeNodeName, types,\n ]);\n } else if (checkNativeTypes && !noDefaults && type === 'JsdocTypeName') {\n preferred = checkNativeTypes(\n preferredTypes, typeNodeName, preferred, parentNode, invalidTypes,\n );\n }\n\n // For fixer\n if (preferred) {\n adjustNames(type, preferred, isGenericMatch, typeNodeName, node, parentNode);\n }\n };\n\n for (const [\n idx,\n jsdocTag,\n ] of jsdocTagsWithPossibleType.entries()) {\n /** @type {(string|false|undefined)[][]} */\n const invalidTypes = [];\n let typeAst;\n\n try {\n typeAst = mode === 'permissive' ? tryParse(jsdocTag.type) : parse(jsdocTag.type, mode);\n } catch {\n continue;\n }\n\n const {\n name: nameInTag,\n tag: tagName,\n } = jsdocTag;\n\n traverse(typeAst, (node, parentNode, property) => {\n const {\n type,\n value,\n } =\n /**\n * @type {import('jsdoc-type-pratt-parser').NameResult}\n */ (node);\n if (![\n 'JsdocTypeAny', 'JsdocTypeName',\n ].includes(type)) {\n return;\n }\n\n getInvalidTypes(type, value, tagName, nameInTag, idx, property, node, parentNode, invalidTypes);\n });\n\n if (invalidTypes.length) {\n const fixedType = stringify(typeAst);\n\n /**\n * @type {import('eslint').Rule.ReportFixer}\n */\n const fix = (fixer) => {\n return fixer.replaceText(\n jsdocNode,\n sourceCode.getText(jsdocNode).replace(\n `{${jsdocTag.type}}`,\n `{${fixedType}}`,\n ),\n );\n };\n\n for (const [\n badType,\n preferredType = '',\n msg,\n ] of invalidTypes) {\n const tagValue = jsdocTag.name ? ` \"${jsdocTag.name}\"` : '';\n if (exemptTagContexts.some(({\n tag,\n types,\n }) => {\n return tag === tagName &&\n (types === true || types.includes(jsdocTag.type));\n })) {\n continue;\n }\n\n report(\n msg ||\n `Invalid JSDoc @${tagName}${tagValue} type \"${badType}\"` +\n (preferredType ? '; ' : '.') +\n (preferredType ? `prefer: ${JSON.stringify(preferredType)}.` : ''),\n preferredType ? fix : null,\n jsdocTag,\n msg ? {\n tagName,\n tagValue,\n } : undefined,\n );\n }\n }\n }\n },\n {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description,\n url,\n },\n ...(!overrideSettings || (Object.values(overrideSettings).some((os) => {\n return os && typeof os === 'object' ?\n /* c8 ignore next -- Ok */\n os.replacement :\n typeof os === 'string';\n })) ?\n {\n fixable: 'code',\n } :\n {}\n ),\n schema,\n type: 'suggestion',\n },\n },\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAK8B,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,WAAW,GAAGA,CAACC,IAAI,EAAEC,SAAS,EAAEC,cAAc,EAAEC,YAAY,EAAEC,IAAI,EAAEC,UAAU,KAAK;EACvF,IAAIC,GAAG,GAAGL,SAAS;EACnB,IAAIC,cAAc,EAAE;IAClB,MAAMK,UAAU,GAAG,8DACjBF,UAAU,CACVG,IAAI;IACN,IAAIP,SAAS,KAAK,IAAI,EAAE;MACtBM,UAAU,CAACE,QAAQ,GAAG,QAAQ;MAC9BF,UAAU,CAACG,GAAG,GAAG,KAAK;MACtBJ,GAAG,GAAG,OAAO;IACf,CAAC,MAAM;MACL,MAAMK,aAAa,GAAGV,SAAS,CAACW,KAAK,CAAC,aAAa,CAAC;MACpD,IAAID,aAAa,EAAE;QACjBJ,UAAU,CAACE,QAAQ,GAAG,OAAO;QAC7BF,UAAU,CAACG,GAAG,GAAG,IAAI;QACrBJ,GAAG,GAAGL,SAAS,CAACY,KAAK,CAAC,CAAC,EAAE,CAACF,aAAa,CAAC,CAAC,CAAC,CAACG,MAAM,CAAC;MACpD,CAAC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AAI,CAAC,CAAC;UACrD,CAAC,CAAC,EAAE;YACF;UACF;UAEAmC,MAAM,CACJkE,GAAG,IACD,kBAAkB5B,OAAO,GAAG6B,QAAQ,UAAUF,OAAO,GAAG,IACvDnC,aAAa,GAAG,IAAI,GAAG,GAAG,CAAC,IAC3BA,aAAa,GAAG,WAAWsC,IAAI,CAACR,SAAS,CAAC9B,aAAa,CAAC,GAAG,GAAG,EAAE,CAAC,EACpEA,aAAa,GAAG+B,GAAG,GAAG,IAAI,EAC1BP,QAAQ,EACRY,GAAG,GAAG;YACJ5B,OAAO;YACP6B;UACF,CAAC,GAAGzC,SACN,CAAC;QACH;MACF;IACF;EACF,CAAC,EACD;IACE2C,gBAAgB,EAAE,IAAI;IACtBhG,IAAI,EAAE;MACJiG,IAAI,EAAE;QACJ7E,WAAW;QACXG;MACF,CAAC;MACD,IAAI,CAACF,gBAAgB,IAAKqB,MAAM,CAACkB,MAAM,CAACvC,gBAAgB,CAAC,CAACkC,IAAI,CAAE2C,EAAE,IAAK;QACrE,OAAOA,EAAE,IAAI,OAAOA,EAAE,KAAK,QAAQ,GACjC;QACAA,EAAE,CAACnF,WAAW,GACd,OAAOmF,EAAE,KAAK,QAAQ;MAC1B,CAAC,CAAE,GACD;QACEC,OAAO,EAAE;MACX,CAAC,GACD,CAAC,CAAC,CACH;MACD7E,MAAM;MACN9B,IAAI,EAAE;IACR;EACF,CACF,CAAC;AACH,CAAC;AAAC4G,OAAA,CAAAnF,iCAAA,GAAAA,iCAAA","ignoreList":[]}
1
+ {"version":3,"file":"buildRejectOrPreferRuleDefinition.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","_jsdoccomment","e","__esModule","default","adjustNames","type","preferred","isGenericMatch","typeNodeName","node","parentNode","ret","parentMeta","meta","brackets","dot","dotBracketEnd","match","slice","length","bracketEnd","endsWith","value","replace","getMessage","upperCase","info","message","replacement","infoUC","buildRejectOrPreferRuleDefinition","checkNativeTypes","typeName","description","overrideSettings","schema","url","iterateJsdoc","context","jsdocNode","report","settings","sourceCode","utils","jsdocTagsWithPossibleType","filterTags","tag","Boolean","tagMightHaveTypePosition","mode","preferredTypes","preferredTypesOriginal","structuredTags","injectObjectPreferredTypes","typeToInject","Object","exemptTagContexts","noDefaults","unifyParentAndChildTypeChecks","options","getPreferredTypeInfo","_type","property","hasMatchingPreferredType","typName","isNameOfGeneric","undefined","checkPostFixes","some","checkPostFix","preferredType","prefType","directNameMatch","values","includes","specificUnify","unifiedSyntaxParentMatch","getInvalidTypes","tagName","nameInTag","idx","invalidTypes","types","preferredSetting","push","nextItem","skipRootChecking","name","startsWith","reportSettings","entries","typs","Array","isArray","jsdocTag","typeAst","tryParse","parse","traverse","fixedType","stringify","fix","fixer","replaceText","getText","badType","msg","tagValue","JSON","iterateAllJsdocs","docs","os","fixable","exports"],"sources":["../src/buildRejectOrPreferRuleDefinition.js"],"sourcesContent":["import iterateJsdoc from './iterateJsdoc.js';\nimport {\n parse,\n stringify,\n traverse,\n tryParse,\n} from '@es-joy/jsdoccomment';\n\n/**\n * Adjusts the parent type node `meta` for generic matches (or type node\n * `type` for `JsdocTypeAny`) and sets the type node `value`.\n * @param {string} type The actual type\n * @param {string} preferred The preferred type\n * @param {boolean} isGenericMatch\n * @param {string} typeNodeName\n * @param {import('jsdoc-type-pratt-parser').NonRootResult} node\n * @param {import('jsdoc-type-pratt-parser').NonRootResult|undefined} parentNode\n * @returns {void}\n */\nconst adjustNames = (type, preferred, isGenericMatch, typeNodeName, node, parentNode) => {\n let ret = preferred;\n if (isGenericMatch) {\n const parentMeta = /** @type {import('jsdoc-type-pratt-parser').GenericResult} */ (\n parentNode\n ).meta;\n if (preferred === '[]') {\n parentMeta.brackets = 'square';\n parentMeta.dot = false;\n ret = 'Array';\n } else {\n const dotBracketEnd = preferred.match(/\\.(?:<>)?$/v);\n if (dotBracketEnd) {\n parentMeta.brackets = 'angle';\n parentMeta.dot = true;\n ret = preferred.slice(0, -dotBracketEnd[0].length);\n } else {\n const bracketEnd = preferred.endsWith('<>');\n if (bracketEnd) {\n parentMeta.brackets = 'angle';\n parentMeta.dot = false;\n ret = preferred.slice(0, -2);\n } else if (\n parentMeta?.brackets === 'square' &&\n (typeNodeName === '[]' || typeNodeName === 'Array')\n ) {\n parentMeta.brackets = 'angle';\n parentMeta.dot = false;\n }\n }\n }\n } else if (type === 'JsdocTypeAny') {\n node.type = 'JsdocTypeName';\n }\n\n /** @type {import('jsdoc-type-pratt-parser').NameResult} */ (\n node\n ).value = ret.replace(/(?:\\.|<>|\\.<>|\\[\\])$/v, '');\n\n // For bare pseudo-types like `<>`\n if (!ret) {\n /** @type {import('jsdoc-type-pratt-parser').NameResult} */ (\n node\n ).value = typeNodeName;\n }\n};\n\n/**\n * @param {boolean} [upperCase]\n * @returns {string}\n */\nconst getMessage = (upperCase) => {\n return 'Use object shorthand or index signatures instead of ' +\n '`' + (upperCase ? 'O' : 'o') + 'bject`, e.g., `{[key: string]: string}`';\n};\n\n/**\n * @type {{\n * message: string,\n * replacement: false\n * }}\n */\nconst info = {\n message: getMessage(),\n replacement: false,\n};\n\n/**\n * @type {{\n * message: string,\n * replacement: false\n * }}\n */\nconst infoUC = {\n message: getMessage(true),\n replacement: false,\n};\n\n/**\n * @param {{\n * checkNativeTypes?: import('./rules/checkTypes.js').CheckNativeTypes|null\n * overrideSettings?: import('./iterateJsdoc.js').Settings['preferredTypes']|null,\n * description?: string,\n * schema?: import('eslint').Rule.RuleMetaData['schema'],\n * typeName?: string,\n * url?: string,\n * }} cfg\n * @returns {import('eslint').Rule.RuleModule}\n */\nexport const buildRejectOrPreferRuleDefinition = ({\n checkNativeTypes = null,\n typeName,\n description = typeName ?? 'Reports types deemed invalid (customizable and with defaults, for preventing and/or recommending replacements).',\n overrideSettings = null,\n schema = [],\n url = 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-types.md#repos-sticky-header',\n}) => {\n return iterateJsdoc(\n ({\n context,\n jsdocNode,\n report,\n settings,\n sourceCode,\n utils,\n }) => {\n const jsdocTagsWithPossibleType = utils.filterTags((tag) => {\n return Boolean(utils.tagMightHaveTypePosition(tag.tag));\n });\n\n const\n /**\n * @type {{\n * preferredTypes: import('./iterateJsdoc.js').PreferredTypes,\n * structuredTags: import('./iterateJsdoc.js').StructuredTags,\n * mode: import('./jsdocUtils.js').ParserMode\n * }}\n */\n {\n mode,\n preferredTypes: preferredTypesOriginal,\n structuredTags,\n } = overrideSettings ? {\n mode: settings.mode,\n preferredTypes: overrideSettings,\n structuredTags: {},\n } : settings;\n\n const injectObjectPreferredTypes = !overrideSettings &&\n !('Object' in preferredTypesOriginal ||\n 'object' in preferredTypesOriginal ||\n 'object.<>' in preferredTypesOriginal ||\n 'Object.<>' in preferredTypesOriginal ||\n 'object<>' in preferredTypesOriginal);\n\n /** @type {import('./iterateJsdoc.js').PreferredTypes} */\n const typeToInject = mode === 'typescript' ?\n {\n Object: 'object',\n 'object.<>': info,\n 'Object.<>': infoUC,\n 'object<>': info,\n 'Object<>': infoUC,\n } :\n {\n Object: 'object',\n 'object.<>': 'Object<>',\n 'Object.<>': 'Object<>',\n 'object<>': 'Object<>',\n };\n\n /** @type {import('./iterateJsdoc.js').PreferredTypes} */\n const preferredTypes = {\n ...injectObjectPreferredTypes ?\n typeToInject :\n {},\n ...preferredTypesOriginal,\n };\n\n const\n /**\n * @type {{\n * noDefaults: boolean,\n * unifyParentAndChildTypeChecks: boolean,\n * exemptTagContexts: ({\n * tag: string,\n * types: true|string[]\n * })[]\n * }}\n */ {\n exemptTagContexts = [],\n noDefaults,\n unifyParentAndChildTypeChecks,\n } = context.options[0] || {};\n\n /**\n * Gets information about the preferred type: whether there is a matching\n * preferred type, what the type is, and whether it is a match to a generic.\n * @param {string} _type Not currently in use\n * @param {string} typeNodeName\n * @param {import('jsdoc-type-pratt-parser').NonRootResult|undefined} parentNode\n * @param {string|undefined} property\n * @returns {[hasMatchingPreferredType: boolean, typeName: string, isGenericMatch: boolean]}\n */\n const getPreferredTypeInfo = (_type, typeNodeName, parentNode, property) => {\n let hasMatchingPreferredType = false;\n let isGenericMatch = false;\n let typName = typeNodeName;\n\n const isNameOfGeneric = parentNode !== undefined && parentNode.type === 'JsdocTypeGeneric' && property === 'left';\n\n const brackets = /** @type {import('jsdoc-type-pratt-parser').GenericResult} */ (\n parentNode\n )?.meta?.brackets;\n const dot = /** @type {import('jsdoc-type-pratt-parser').GenericResult} */ (\n parentNode\n )?.meta?.dot;\n\n if (brackets === 'angle') {\n const checkPostFixes = dot ? [\n '.', '.<>',\n ] : [\n '<>',\n ];\n isGenericMatch = checkPostFixes.some((checkPostFix) => {\n const preferredType = preferredTypes?.[typeNodeName + checkPostFix];\n\n // Does `unifyParentAndChildTypeChecks` need to be checked here?\n if (\n (unifyParentAndChildTypeChecks || isNameOfGeneric ||\n /* c8 ignore next 2 -- If checking `unifyParentAndChildTypeChecks` */\n (typeof preferredType === 'object' &&\n preferredType?.unifyParentAndChildTypeChecks)\n ) &&\n preferredType !== undefined\n ) {\n typName += checkPostFix;\n\n return true;\n }\n\n return false;\n });\n }\n\n if (\n !isGenericMatch && property &&\n /** @type {import('jsdoc-type-pratt-parser').NonRootResult} */ (\n parentNode\n ).type === 'JsdocTypeGeneric'\n ) {\n const checkPostFixes = dot ? [\n '.', '.<>',\n ] : [\n brackets === 'angle' ? '<>' : '[]',\n ];\n\n isGenericMatch = checkPostFixes.some((checkPostFix) => {\n const preferredType = preferredTypes?.[checkPostFix];\n if (\n // Does `unifyParentAndChildTypeChecks` need to be checked here?\n (unifyParentAndChildTypeChecks || isNameOfGeneric ||\n /* c8 ignore next 2 -- If checking `unifyParentAndChildTypeChecks` */\n (typeof preferredType === 'object' &&\n preferredType?.unifyParentAndChildTypeChecks)) &&\n preferredType !== undefined\n ) {\n typName = checkPostFix;\n\n return true;\n }\n\n return false;\n });\n }\n\n const prefType = preferredTypes?.[typeNodeName];\n const directNameMatch = prefType !== undefined &&\n !Object.values(preferredTypes).includes(typeNodeName);\n const specificUnify = typeof prefType === 'object' &&\n prefType?.unifyParentAndChildTypeChecks;\n const unifiedSyntaxParentMatch = property && directNameMatch && (unifyParentAndChildTypeChecks || specificUnify);\n isGenericMatch = isGenericMatch || Boolean(unifiedSyntaxParentMatch);\n\n hasMatchingPreferredType = isGenericMatch ||\n directNameMatch && !property;\n\n return [\n hasMatchingPreferredType, typName, isGenericMatch,\n ];\n };\n\n /**\n * Collect invalid type info.\n * @param {string} type\n * @param {string} value\n * @param {string} tagName\n * @param {string} nameInTag\n * @param {number} idx\n * @param {string|undefined} property\n * @param {import('jsdoc-type-pratt-parser').NonRootResult} node\n * @param {import('jsdoc-type-pratt-parser').NonRootResult|undefined} parentNode\n * @param {(string|false|undefined)[][]} invalidTypes\n * @returns {void}\n */\n const getInvalidTypes = (type, value, tagName, nameInTag, idx, property, node, parentNode, invalidTypes) => {\n let typeNodeName = type === 'JsdocTypeAny' ? '*' : value;\n\n const [\n hasMatchingPreferredType,\n typName,\n isGenericMatch,\n ] = getPreferredTypeInfo(type, typeNodeName, parentNode, property);\n\n let preferred;\n let types;\n if (hasMatchingPreferredType) {\n const preferredSetting = preferredTypes[typName];\n typeNodeName = typName === '[]' ? typName : typeNodeName;\n\n if (!preferredSetting) {\n invalidTypes.push([\n typeNodeName,\n ]);\n } else if (typeof preferredSetting === 'string') {\n preferred = preferredSetting;\n invalidTypes.push([\n typeNodeName, preferred,\n ]);\n } else if (preferredSetting && typeof preferredSetting === 'object') {\n const nextItem = preferredSetting.skipRootChecking && jsdocTagsWithPossibleType[idx + 1];\n\n if (!nextItem || !nextItem.name.startsWith(`${nameInTag}.`)) {\n preferred = preferredSetting.replacement;\n invalidTypes.push([\n typeNodeName,\n preferred,\n preferredSetting.message,\n ]);\n }\n } else {\n utils.reportSettings(\n 'Invalid `settings.jsdoc.preferredTypes`. Values must be falsy, a string, or an object.',\n );\n\n return;\n }\n } else if (Object.entries(structuredTags).some(([\n tag,\n {\n type: typs,\n },\n ]) => {\n types = typs;\n\n return tag === tagName &&\n Array.isArray(types) &&\n !types.includes(typeNodeName);\n })) {\n invalidTypes.push([\n typeNodeName, types,\n ]);\n } else if (checkNativeTypes && !noDefaults && type === 'JsdocTypeName') {\n preferred = checkNativeTypes(\n preferredTypes, typeNodeName, preferred, parentNode, invalidTypes,\n );\n }\n\n // For fixer\n if (preferred) {\n adjustNames(type, preferred, isGenericMatch, typeNodeName, node, parentNode);\n }\n };\n\n for (const [\n idx,\n jsdocTag,\n ] of jsdocTagsWithPossibleType.entries()) {\n /** @type {(string|false|undefined)[][]} */\n const invalidTypes = [];\n let typeAst;\n\n try {\n typeAst = mode === 'permissive' ? tryParse(jsdocTag.type) : parse(jsdocTag.type, mode);\n } catch {\n continue;\n }\n\n const {\n name: nameInTag,\n tag: tagName,\n } = jsdocTag;\n\n traverse(typeAst, (node, parentNode, property) => {\n const {\n type,\n value,\n } =\n /**\n * @type {import('jsdoc-type-pratt-parser').NameResult}\n */ (node);\n if (![\n 'JsdocTypeAny', 'JsdocTypeName',\n ].includes(type)) {\n return;\n }\n\n getInvalidTypes(type, value, tagName, nameInTag, idx, property, node, parentNode, invalidTypes);\n });\n\n if (invalidTypes.length) {\n const fixedType = stringify(typeAst);\n\n /**\n * @type {import('eslint').Rule.ReportFixer}\n */\n const fix = (fixer) => {\n return fixer.replaceText(\n jsdocNode,\n sourceCode.getText(jsdocNode).replace(\n `{${jsdocTag.type}}`,\n `{${fixedType}}`,\n ),\n );\n };\n\n for (const [\n badType,\n preferredType = '',\n msg,\n ] of invalidTypes) {\n const tagValue = jsdocTag.name ? ` \"${jsdocTag.name}\"` : '';\n if (exemptTagContexts.some(({\n tag,\n types,\n }) => {\n return tag === tagName &&\n (types === true || types.includes(jsdocTag.type));\n })) {\n continue;\n }\n\n report(\n msg ||\n `Invalid JSDoc @${tagName}${tagValue} type \"${badType}\"` +\n (preferredType ? '; ' : '.') +\n (preferredType ? `prefer: ${JSON.stringify(preferredType)}.` : ''),\n preferredType ? fix : null,\n jsdocTag,\n msg ? {\n tagName,\n tagValue,\n } : undefined,\n );\n }\n }\n }\n },\n {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description,\n url,\n },\n ...(!overrideSettings || (Object.values(overrideSettings).some((os) => {\n return os && typeof os === 'object' ?\n /* c8 ignore next -- Ok */\n os.replacement :\n typeof os === 'string';\n })) ?\n {\n fixable: 'code',\n } :\n {}\n ),\n schema,\n type: 'suggestion',\n },\n },\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAK8B,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,WAAW,GAAGA,CAACC,IAAI,EAAEC,SAAS,EAAEC,cAAc,EAAEC,YAAY,EAAEC,IAAI,EAAEC,UAAU,KAAK;EACvF,IAAIC,GAAG,GAAGL,SAAS;EACnB,IAAIC,cAAc,EAAE;IAClB,MAAMK,UAAU,GAAG,8DACjBF,UAAU,CACVG,IAAI;IACN,IAAIP,SAAS,KAAK,IAAI,EAAE;MACtBM,UAAU,CAACE,QAAQ,GAAG,QAAQ;MAC9BF,UAAU,CAACG,GAAG,GAAG,KAAK;MACtBJ,GAAG,GAAG,OAAO;IACf,CAAC,MAAM;MACL,MAAMK,aAAa,GAAGV,SAAS,CAACW,KAAK,CAAC,aAAa,CAAC;MACpD,IAAID,aAAa,EAAE;QACjBJ,UAAU,CAACE,QAAQ,GAAG,OAAO;QAC7BF,UAAU,CAACG,GAAG,GAAG,IAAI;QACrBJ,GAAG,GAAGL,SAAS,CAACY,KAAK,CAAC,CAAC,EAAE,CAACF,aAAa,CAAC,CAAC,CAAC,CAACG,MAAM,CAAC;MACpD,CAAC,MAAM;QACL,MAAMC,UAAU,GAAGd,SAAS,CAACe,QAAQ,CAAC,IA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E,GAAG,IACD,kBAAkB5B,OAAO,GAAG6B,QAAQ,UAAUF,OAAO,GAAG,IACvDnC,aAAa,GAAG,IAAI,GAAG,GAAG,CAAC,IAC3BA,aAAa,GAAG,WAAWsC,IAAI,CAACR,SAAS,CAAC9B,aAAa,CAAC,GAAG,GAAG,EAAE,CAAC,EACpEA,aAAa,GAAG+B,GAAG,GAAG,IAAI,EAC1BP,QAAQ,EACRY,GAAG,GAAG;YACJ5B,OAAO;YACP6B;UACF,CAAC,GAAGzC,SACN,CAAC;QACH;MACF;IACF;EACF,CAAC,EACD;IACE2C,gBAAgB,EAAE,IAAI;IACtBhG,IAAI,EAAE;MACJiG,IAAI,EAAE;QACJ7E,WAAW;QACXG;MACF,CAAC;MACD,IAAI,CAACF,gBAAgB,IAAKqB,MAAM,CAACkB,MAAM,CAACvC,gBAAgB,CAAC,CAACkC,IAAI,CAAE2C,EAAE,IAAK;QACrE,OAAOA,EAAE,IAAI,OAAOA,EAAE,KAAK,QAAQ,GACjC;QACAA,EAAE,CAACnF,WAAW,GACd,OAAOmF,EAAE,KAAK,QAAQ;MAC1B,CAAC,CAAE,GACD;QACEC,OAAO,EAAE;MACX,CAAC,GACD,CAAC,CAAC,CACH;MACD7E,MAAM;MACN9B,IAAI,EAAE;IACR;EACF,CACF,CAAC;AACH,CAAC;AAAC4G,OAAA,CAAAnF,iCAAA,GAAAA,iCAAA","ignoreList":[]}
@@ -5,5 +5,5 @@ export function buildRejectOrPreferRuleDefinition({ checkNativeTypes, typeName,
5
5
  schema?: import("eslint").Rule.RuleMetaData["schema"];
6
6
  typeName?: string;
7
7
  url?: string;
8
- }): import("@eslint/core").RuleDefinition<import("@eslint/core").RuleDefinitionTypeOptions>;
8
+ }): import("eslint").Rule.RuleModule;
9
9
  //# sourceMappingURL=buildRejectOrPreferRuleDefinition.d.ts.map
@@ -6,7 +6,7 @@ export function buildForbidRuleDefinition({ contextName, contexts: cntxts, descr
6
6
  modifyContext?: (context: import("eslint").Rule.RuleContext) => import("eslint").Rule.RuleContext;
7
7
  schema?: import("eslint").Rule.RuleMetaData["schema"];
8
8
  url?: string;
9
- }): import("@eslint/core").RuleDefinition<import("@eslint/core").RuleDefinitionTypeOptions>;
9
+ }): import("eslint").Rule.RuleModule;
10
10
  export type Contexts = (string | {
11
11
  comment: string;
12
12
  context: string;
@@ -5,4 +5,4 @@ export function buildRejectOrPreferRuleDefinition({ checkNativeTypes, typeName,
5
5
  schema?: import("eslint").Rule.RuleMetaData["schema"];
6
6
  typeName?: string;
7
7
  url?: string;
8
- }): import("@eslint/core").RuleDefinition<import("@eslint/core").RuleDefinitionTypeOptions>;
8
+ }): import("eslint").Rule.RuleModule;
@@ -249,7 +249,7 @@ export type StateObject = {
249
249
  * The Node AST as supplied by the parser.
250
250
  */
251
251
  export type Node = import("eslint").Rule.Node;
252
- export type Report = (message: string, fix?: import("eslint").Rule.ReportFixer | null | undefined, jsdocLoc?: {
252
+ export type Report = (message: string, fix?: import("@eslint/core").RuleFixer | null | undefined, jsdocLoc?: {
253
253
  line?: Integer;
254
254
  column?: Integer;
255
255
  } | (import("comment-parser").Spec & {
@@ -358,9 +358,7 @@ export type JsdocVisitor = (arg: {
358
358
  utils: Utils;
359
359
  }) => void;
360
360
  export type NonCommentArgs = {
361
- node: Node & {
362
- range: [number, number];
363
- };
361
+ node: Node;
364
362
  state: StateObject;
365
363
  };
366
364
  export type RuleConfig = {
@@ -1,4 +1,4 @@
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
  /**
4
4
  * Iterates strict types to see if any should be added to `invalidTypes` (and
@@ -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]: ((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("eslint").AST.Program & {
4
+ parent: null;
5
+ }) => void) & ((node: import("eslint").AST.Program) => 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,2 +1,2 @@
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;
@@ -1,2 +1,2 @@
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;
@@ -537,6 +537,7 @@ const ignorableNestedTypes = new Set(['ArrowFunctionExpression', 'FunctionDeclar
537
537
  * @returns {import('eslint').Rule.Node|false}
538
538
  */
539
539
  const getExportAncestor = function (nde) {
540
+ /** @type {import('eslint').Rule.Node|null} */
540
541
  let node = nde;
541
542
  let idx = 0;
542
543
  const ignorableIfDeep = ignorableNestedTypes.has(nde?.type);