eslint-plugin-jsdoc 37.6.3 → 37.8.1

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/getDefaultTagStructureForMode.js"],"names":["getDefaultTagStructureForMode","mode","isJsdoc","isClosure","isTypescript","isPermissive","isJsdocOrTypescript","isTypescriptOrClosure","isClosureOrPermissive","isJsdocTypescriptOrPermissive","Map"],"mappings":";;;;;;;AAAA,MAAMA,6BAA6B,GAAIC,IAAD,IAAU;AAC9C,QAAMC,OAAO,GAAGD,IAAI,KAAK,OAAzB;AACA,QAAME,SAAS,GAAGF,IAAI,KAAK,SAA3B;AACA,QAAMG,YAAY,GAAGH,IAAI,KAAK,YAA9B;AACA,QAAMI,YAAY,GAAGJ,IAAI,KAAK,YAA9B;AAEA,QAAMK,mBAAmB,GAAGJ,OAAO,IAAIE,YAAvC;AACA,QAAMG,qBAAqB,GAAGH,YAAY,IAAID,SAA9C;AACA,QAAMK,qBAAqB,GAAGL,SAAS,IAAIE,YAA3C;AACA,QAAMI,6BAA6B,GAAGH,mBAAmB,IAAID,YAA7D,CAT8C,CAW9C;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;;AAEA,SAAO,IAAIK,GAAJ,CAAQ,CACb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACjB;AACE,GACE,cADF,EACkB,sBADlB,CAFe,EAMf;AACA,GACE,oBADF,EACwB,IADxB,CAPe,CAAR,CADX,CADa,EAeb,CACE,KADF,EACS,IAAIA,GAAJ,CAAQ,CACb,CACE,cADF,EACkB,mBADlB,CADa,EAKb;AACA,GACE,cADF,EACkB,IADlB,CANa,EAUb;AACA;AACA,GACE,aADF,EACiB,IADjB,CAZa,CAAR,CADT,CAfa,EAkCb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB,CACE,cADF,EACkB,mBADlB,CADkB,EAKlB;AACA,GACE,cADF,EACkB,IADlB,CANkB,EAUlB;AACA;AACA,GACE,aADF,EACiB,IADjB,CAZkB,CAAR,CADd,CAlCa,EAqDb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CACpB;AACE,GACE,cADF,EACkB,sBADlB,CAFkB,EAMlB;AACA,GACE,aADF,EACiB,IADjB,CAPkB,EAWlB;AACA,GACE,oBADF,EACwB,IADxB,CAZkB,CAAR,CADd,CArDa,EAwEb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACE,GACE,cADF,EACkB,sBADlB,CAHiB,EAOjB;AACA,GACE,oBADF,EACwB,IADxB,CARiB,CAAR,CADb,CAxEa,EAuFb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CACpB;AACA;AACE,GACE,cADF,EACkB,mBADlB,CAHkB,EAOlB;AACA,GACE,cADF,EACkB,IADlB,CARkB,CAAR,CADd,CAvFa,EAsGb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACjB;AACE,GACE,cADF,EACkB,mBADlB,CAFe,EAMf,CACE,aADF,EACiB,IADjB,CANe,CAAR,CADX,CAtGa,EAmHb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACjB;AACE,GACE,cADF,EACkB,mBADlB,CAFe,EAMf,CACE,aADF,EACiB,IADjB,CANe,CAAR,CADX,CAnHa,EA+Hb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CACpB;AACE,GACE,cADF,EACkB,mBADlB,CAFkB,EAMlB,CACE,aADF,EACiB,IADjB,CANkB,CAAR,CADd,CA/Ha,EA2Ib,CACE,aADF,EACiB,IAAIA,GAAJ,CAAQ,CACvB;AACE,GACE,cADF,EACkB,mBADlB,CAFqB,EAMrB,CACE,aADF,EACiB,IADjB,CANqB,CAAR,CADjB,CA3Ia,EAwJb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB,CACE,cAD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ACU,IAAIA,GAAJ,CAAQ,CAChB;AACE,GACE,cADF,EACkB,mBADlB,CAFc,CAAR,CADV,CA5Qa,EAqRb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CAChB;AACA;AACA;AACE,GACE,cADF,EACkB,mBADlB,CAJc,EAQd;AACA,GACE,cADF,EACkB,IADlB,CATc,EAad;AACA,GACE,oBADF,EACwB,IADxB,CAdc,CAAR,CADV,CArRa,EA0Sb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACrB;AACE,GACE,cADF,EAEED,6BAA6B,GAAG,mBAAH,GAAyB,KAFxD,CAFmB,CAAR,CADf,CA1Sa,EAoTb,CACE,YADF,EACgB,IAAIC,GAAJ,CAAQ,CACtB;AACA;AACE,GACE,cADF,EACkB,IADlB,CAHoB,CAAR,CADhB,CApTa,EA8Tb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACjB;AACE,GACE,cADF,EACkB,sBADlB,CAFe,EAMf;AACA,GACE,oBADF,EACwB,IADxB,CAPe,CAAR,CADX,CA9Ta,EA4Ub,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACE,GACE,cADF,EACkB,sBADlB,CAHiB,CAAR,CADb,CA5Ua,EAsVb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAClB;AACE,GACE,cADF,EACkB,mBADlB,CAFgB,EAMhB;AACA,GACE,aADF,EACiB,IADjB,CAPgB,CAAR,CADZ,CAtVa,EAoWb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CACpB;AACA;AACE,GACE,cADF,EACkB,sBADlB,CAHkB,EAOlB;AACA,GACE,oBADF,EACwB,IADxB,CARkB,CAAR,CADd,CApWa,EAkXb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACrB;AACA;AACE,GACE,cADF,EACkB,sBADlB,CAHmB,EAOnB;AACA,GACE,oBADF,EACwB,IADxB,CARmB,CAAR,CADf,CAlXa,EAiYb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAClB;AACE,GACE,cADF,EACkB,mBADlB,CAFgB,CAAR,CADZ,CAjYa,EAyYb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACE,GACE,cADF,EACkB,sBADlB,CAHe,EAOf;AACA,GACE,oBADF,EACwB,IADxB,CARe,CAAR,CADX,CAzYa,EAwZb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACjB;AACE,GACE,cADF,EACkB,mBADlB,CAFe,CAAR,CADX,CAxZa,EAiab,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CACpB;AACA;AACA;AACE,GACE,aADF,EACiB,IADjB,CAJkB,CAAR,CADd,CAjaa,EA4ab,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAClB;AACA;AACA;AACE,GACE,cADF,EACkBR,OAAO,GAAG,mBAAH,GAAyB,MADlD,CAJgB,EAQhB;AACA,GACE,aADF,EACiB,IADjB,CATgB,CAAR,CADZ,CA5aa,EA4bb,CACE,MADF,EACU,IAAIQ,GAAJ,CAAQ,CAChB;AACA;AACE,GACE,cADF,EACkB,mBADlB,CAHc,EAOd;AACA,GACE,cADF,EACkB,IADlB,CARc,EAYd;AACA,GACE,oBADF,EACwB,IADxB,CAbc,CAAR,CADV,CA5ba,EAgdb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACrB;AACE,GACE,cADF,EACkB,mBADlB,CAFmB,EAMnB;AACA,GACE,aADF,EACiB,IADjB,CAPmB,CAAR,CADf,CAhda,EA6db,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACE,GACE,aADF,EACiBF,qBADjB,CAHiB,CAAR,CADb,CA7da,EAueb,CACE,OADF,EACW,IAAIE,GAAJ,CAAQ,CACf,CACE,cADF,EACkB,mBADlB,CADe,EAKf;AACA;AACA;AACA;AACA,GACE,cADF,EACkB,IADlB,CATe,EAaf;AACA;AACA,GACE,aADF,EACiB,IADjB,CAfe,CAAR,CADX,CAvea,EA6fb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACE,GACE,aADF,EACiBF,qBADjB,CAHiB,CAAR,CADb,CA7fa,EAugBb,CACE,MADF,EACU,IAAIE,GAAJ,CAAQ,CACd,CACE,cADF,EACkB,mBADlB,CADc,EAKd;AACA,GACE,cADF,EACkB,IADlB,CANc,EAUd;AACA;AACA,GACE,aADF,EACiB,IADjB,CAZc,CAAR,CADV,CAvgBa,EA0hBb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB,CACE,cADF,EACkB,mBADlB,CADkB,EAKlB;AACA;AACA,GACE,cADF,EACkB,IADlB,CAPkB,EAWlB;AACA;AACA,GACE,aADF,EACiB,IADjB,CAbkB,CAAR,CADd,CA1hBa,EA8iBb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACrB;AACA;AACE,GACE,aADF,EACiBF,qBADjB,CAHmB,CAAR,CADf,CA9iBa,EAwjBb,CACE,QADF,EACY,IAAIE,GAAJ,CAAQ,CAClB;AACE,GACE,aADF,EACiBF,qBADjB,CAFgB,CAAR,CADZ,CAxjBa,EAikBb,CACE,SADF,EACa,IAAIE,GAAJ,CAAQ,CACnB;AACE,GACE,aADF,EACiB,IADjB,CAFiB,CAAR,CADb,CAjkBa,EAykBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAClB;AACE,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CAzkBa,EAklBb,CACE,KADF,EACS,IAAIA,GAAJ,CAAQ,CACf;AACA;AACE,GACE,cADF,EACkB,MADlB,CAHa,CAAR,CADT,CAllBa,EA4lBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAClB;AACE,GACE,aADF,EACiBF,qBADjB,CAFgB,CAAR,CADZ,CA5lBa,EAqmBb,CACE,UADF,EACc,IAAIE,GAAJ,CAAQ,CAClB,CACE,cADF,EACkB,CAACP,SADnB,CADkB,EAIlB,CACE,cADF,EACkBA,SADlB,CAJkB,CAAR,CADd,CArmBa,EAgnBb,CACE,UADF,EACc,IAAIO,GAAJ,CAAQ,CAClB,CACE,cADF,EACkBR,OAAO,GAAG,MAAH,GAAY,sBADrC,CADkB,EAKlB;AACA;AACA;AACA,GACE,aADF,EACiBK,qBAAqB,IAAIF,YAD1C,CARkB,CAAR,CADd,CAhnBa,EA+nBb,CACE,MADF,EACU,IAAIK,GAAJ,CAAQ,CAChB;AACA;AACE,GACE,cADF,EACkBR,OAAO,GAAG,sBAAH,GAA4B,KADrD,CAHc,EAOd,CACE,cADF,EACkBK,qBADlB,CAPc,EAWd;AACA,GACE,oBADF,EACwBL,OADxB,CAZc,CAAR,CADV,CA/nBa,EAkpBb,CACE,QADF,EACY,IAAIQ,GAAJ,CAAQ,CAClB;AACE,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CAlpBa,EA2pBb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CAChB;AACA;AACE,GACE,cADF,EACkB,IADlB,CAHc,CAAR,CADV,CA3pBa,EAqqBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACE,GACE,cADF,EACkB,mBADlB,CAHiB,EAOjB;AACA,GACE,cADF,EACkBD,6BADlB,CARiB,EAYjB;AACA,GACE,aADF,EACiB,IADjB,CAbiB,EAiBjB;AACA,GACE,oBADF,EACwB,IADxB,CAlBiB,CAAR,CADb,CArqBa,EA8rBb,CACE,KADF,EACS,IAAIC,GAAJ,CAAQ,CACf;AACE,GACE,cADF,EACkB,mBADlB,CAFa,EAMb;AACA,GACE,aADF,EACiB,IADjB,CAPa,CAAR,CADT,CA9rBa,EA4sBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAClB;AACE,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CA5sBa,EAotBb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACjB;AACE,GACE,aADF,EACiB,IADjB,CAFe,CAAR,CADX,CAptBa,CAAR,CAAP;AA6tBD,CAtwBD;;eAwwBeV,6B","sourcesContent":["const getDefaultTagStructureForMode = (mode) => {\n const isJsdoc = mode === 'jsdoc';\n const isClosure = mode === 'closure';\n const isTypescript = mode === 'typescript';\n const isPermissive = mode === 'permissive';\n\n const isJsdocOrTypescript = isJsdoc || isTypescript;\n const isTypescriptOrClosure = isTypescript || isClosure;\n const isClosureOrPermissive = isClosure || isPermissive;\n const isJsdocTypescriptOrPermissive = isJsdocOrTypescript || isPermissive;\n\n // Properties:\n // `nameContents` - 'namepath-referencing'|'namepath-defining'|'text'|false\n // `typeAllowed` - boolean\n // `nameRequired` - boolean\n // `typeRequired` - boolean\n // `typeOrNameRequired` - boolean\n\n // All of `typeAllowed` have a signature with \"type\" except for\n // `augments`/`extends` (\"namepath\")\n // `param`/`arg`/`argument` (no signature)\n // `property`/`prop` (no signature)\n // `modifies` (undocumented)\n\n // None of the `nameContents: 'namepath-defining'` show as having curly\n // brackets for their name/namepath\n\n // Among `namepath-defining` and `namepath-referencing`, these do not seem\n // to allow curly brackets in their doc signature or examples (`modifies`\n // references namepaths within its type brackets and `param` is\n // name-defining but not namepath-defining, so not part of these groups)\n\n // Todo: Should support special processing for \"name\" as distinct from\n // \"namepath\" (e.g., param can't define a namepath)\n\n // Once checking inline tags:\n // Todo: Re: `typeOrNameRequired`, `@link` (or @linkcode/@linkplain) seems\n // to require a namepath OR URL and might be checked as such.\n // Todo: Should support a `tutorialID` type (for `@tutorial` block and\n // inline)\n\n return new Map([\n [\n 'alias', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'arg', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `param`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'argument', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `param`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'augments', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // Does not show curly brackets in either the signature or examples\n [\n 'typeAllowed', true,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'borrows', new Map([\n // `borrows` has a different format, however, so needs special parsing;\n // seems to require both, and as \"namepath\"'s\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'callback', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples)\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"namepath\"\n [\n 'nameRequired', true,\n ],\n ]),\n ],\n\n [\n 'class', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'const', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'constant', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'constructor', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'define', new Map([\n [\n 'typeRequired', isClosure,\n ],\n ]),\n ],\n\n [\n 'emits', new Map([\n // Signature seems to require a \"name\" (of an event) and no counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n ]),\n ],\n\n [\n 'enum', new Map([\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'event', new Map([\n // The doc signature of `event` seems to require a \"name\"\n [\n 'nameRequired', true,\n ],\n\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n\n [\n 'exception', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'export', new Map([\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'extends', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // Does not show curly brackets in either the signature or examples\n [\n 'typeAllowed', isTypescriptOrClosure || isPermissive,\n ],\n\n [\n 'nameRequired', isJsdoc,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', isTypescriptOrClosure || isPermissive,\n ],\n ]),\n ],\n\n [\n 'external', new Map([\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"name\" (and a special syntax for the `external` name)\n [\n 'nameRequired', true,\n ],\n ]),\n ],\n\n [\n 'fires', new Map([\n // Signature seems to require a \"name\" (of an event) and no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n ]),\n ],\n\n [\n 'function', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n [\n 'func', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n\n [\n 'host', new Map([\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `external`\n [\n 'nameRequired', true,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'interface', new Map([\n // Allows for \"name\" in signature, but indicates as optional\n [\n 'nameContents',\n isJsdocTypescriptOrPermissive ? 'namepath-defining' : false,\n ],\n ]),\n ],\n\n [\n 'implements', new Map([\n // Shows curly brackets in the doc signature and examples\n // \"typeExpression\"\n [\n 'typeRequired', true,\n ],\n ]),\n ],\n\n [\n 'lends', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'listens', new Map([\n // Signature seems to require a \"name\" (of an event) and no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n ]),\n ],\n\n [\n 'member', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'memberof', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples),\n // though it allows an incomplete namepath ending with connecting symbol\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n [\n 'memberof!', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples),\n // though it allows an incomplete namepath ending with connecting symbol\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'method', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n [\n 'mixes', new Map([\n // Signature seems to require a \"OtherObjectPath\" with no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"OtherObjectPath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'mixin', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n\n [\n 'modifies', new Map([\n // Has no documentation, but test example has curly brackets, and\n // \"name\" would be suggested rather than \"namepath\" based on example;\n // not sure if name is required\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'module', new Map([\n // Optional \"name\" and no curly brackets\n // this block impacts `no-undefined-types` and `valid-types` (search for\n // \"isNamepathDefiningTag|tagMightHaveNamepath|tagMightHaveEitherTypeOrNamePosition\")\n [\n 'nameContents', isJsdoc ? 'namepath-defining' : 'text',\n ],\n\n // Shows the signature with curly brackets but not in the example\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'name', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples)\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"namepath\"\n [\n 'nameRequired', true,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'namespace', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Shows the signature with curly brackets but not in the example\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'package', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'param', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Though no signature provided requiring, per\n // https://jsdoc.app/tags-param.html:\n // \"The @param tag requires you to specify the name of the parameter you\n // are documenting.\"\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'private', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'prop', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `property`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'property', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // No docs indicate required, but since parallel to `param`, we treat as\n // such:\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'protected', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'public', new Map([\n // Does not show a signature nor show curly brackets in the example\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'returns', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'return', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'see', new Map([\n // Signature allows for \"namepath\" or text, so user must configure to\n // 'namepath-referencing' to enforce checks\n [\n 'nameContents', 'text',\n ],\n ]),\n ],\n\n [\n 'static', new Map([\n // Does not show a signature nor show curly brackets in the example\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'suppress', new Map([\n [\n 'nameContents', !isClosure,\n ],\n [\n 'typeRequired', isClosure,\n ],\n ]),\n ],\n\n [\n 'template', new Map([\n [\n 'nameContents', isJsdoc ? 'text' : 'namepath-referencing',\n ],\n\n // Though defines `nameContents: 'namepath-defining'` in a sense, it is\n // not parseable in the same way for template (e.g., allowing commas),\n // so not adding\n [\n 'typeAllowed', isTypescriptOrClosure || isPermissive,\n ],\n ]),\n ],\n\n [\n 'this', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n // Not used with namepath in Closure/TypeScript, however\n [\n 'nameContents', isJsdoc ? 'namepath-referencing' : false,\n ],\n\n [\n 'typeRequired', isTypescriptOrClosure,\n ],\n\n // namepath\n [\n 'typeOrNameRequired', isJsdoc,\n ],\n ]),\n ],\n\n [\n 'throws', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'type', new Map([\n // Shows curly brackets in the doc signature and examples\n // \"typeName\"\n [\n 'typeRequired', true,\n ],\n ]),\n ],\n\n [\n 'typedef', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples)\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"namepath\"\n [\n 'nameRequired', isJsdocTypescriptOrPermissive,\n ],\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'var', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'yields', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'yield', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n ]);\n};\n\nexport default getDefaultTagStructureForMode;\n"],"file":"getDefaultTagStructureForMode.js"}
1
+ {"version":3,"sources":["../src/getDefaultTagStructureForMode.js"],"names":["getDefaultTagStructureForMode","mode","isJsdoc","isClosure","isTypescript","isPermissive","isJsdocOrPermissive","isJsdocOrTypescript","isTypescriptOrClosure","isClosureOrPermissive","isJsdocTypescriptOrPermissive","Map"],"mappings":";;;;;;;AAAA,MAAMA,6BAA6B,GAAIC,IAAD,IAAU;AAC9C,QAAMC,OAAO,GAAGD,IAAI,KAAK,OAAzB;AACA,QAAME,SAAS,GAAGF,IAAI,KAAK,SAA3B;AACA,QAAMG,YAAY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sBADlB,CAHiB,EAOjB;AACA,GACE,oBADF,EACwB,IADxB,CARiB,CAAR,CADb,CAxEa,EAuFb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CACpB;AACA;AACE,GACE,cADF,EACkB,mBADlB,CAHkB,EAOlB;AACA,GACE,cADF,EACkB,IADlB,CARkB,CAAR,CADd,CAvFa,EAsGb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACjB;AACE,GACE,cADF,EACkB,mBADlB,CAFe,EAMf,CACE,aADF,EACiB,IADjB,CANe,CAAR,CADX,CAtGa,EAmHb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACjB;AACE,GACE,cADF,EACkB,mBADlB,CAFe,EAMf,CACE,aADF,EACiB,IADjB,CANe,CAAR,CADX,CAnHa,EA+Hb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CACpB;AACE,GACE,cADF,EACkB,mBADlB,CAFkB,EAMlB,CACE,aADF,EACiB,IADjB,CANkB,CAAR,CADd,CA/Ha,EA2Ib,CACE,aADF,EACiB,IAAIA,GAAJ,CAAQ,CACvB;AACE,GACE,cADF,EACkB,mBADlB,CAFqB,EAMrB,CACE,aADF,EACiB,IADjB,CANqB,CAAR,CADjB,CA3Ia,EAwJb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAChB,CACE,cADF,EACkBR,SADlB,CADgB,CAAR,CADZ,CAxJa,EAgKb,CACE,OADF,EACW,IAAIQ,GAAJ,CAAQ,CACjB;AACE,GACE,cADF,EACkB,sBADlB,CAFe,CAAR,CADX,CAhKa,EAyKb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CAChB;AACE,GACE,aADF,EACiB,IADjB,CAFc,CAAR,CADV,CAzKa,EAkLb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACjB;AACE,GACE,cADF,EACkB,IADlB,CAFe,EAMf;AACA;AACA;AACA,GACE,cADF,EACkB,mBADlB,CATe,CAAR,CADX,CAlLa,EAkMb,CACE,WADF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oTb,CACE,YADF,EACgB,IAAIC,GAAJ,CAAQ,CACtB;AACA;AACE,GACE,cADF,EACkB,IADlB,CAHoB,CAAR,CADhB,CApTa,EA8Tb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACjB;AACE,GACE,cADF,EACkB,sBADlB,CAFe,EAMf;AACA,GACE,oBADF,EACwB,IADxB,CAPe,CAAR,CADX,CA9Ta,EA4Ub,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACE,GACE,cADF,EACkB,sBADlB,CAHiB,CAAR,CADb,CA5Ua,EAsVb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAClB;AACE,GACE,cADF,EACkB,mBADlB,CAFgB,EAMhB;AACA,GACE,aADF,EACiB,IADjB,CAPgB,CAAR,CADZ,CAtVa,EAoWb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CACpB;AACA;AACE,GACE,cADF,EACkB,sBADlB,CAHkB,EAOlB;AACA,GACE,oBADF,EACwB,IADxB,CARkB,CAAR,CADd,CApWa,EAkXb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACrB;AACA;AACE,GACE,cADF,EACkB,sBADlB,CAHmB,EAOnB;AACA,GACE,oBADF,EACwB,IADxB,CARmB,CAAR,CADf,CAlXa,EAiYb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAClB;AACE,GACE,cADF,EACkB,mBADlB,CAFgB,CAAR,CADZ,CAjYa,EAyYb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACjB;AACA;AACE,GACE,cADF,EACkB,sBADlB,CAHe,EAOf;AACA,GACE,oBADF,EACwB,IADxB,CARe,CAAR,CADX,CAzYa,EAwZb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACjB;AACE,GACE,cADF,EACkB,mBADlB,CAFe,CAAR,CADX,CAxZa,EAiab,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CACpB;AACA;AACA;AACE,GACE,aADF,EACiB,IADjB,CAJkB,CAAR,CADd,CAjaa,EA4ab,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAClB;AACA;AACA;AACE,GACE,cADF,EACkBT,OAAO,GAAG,mBAAH,GAAyB,MADlD,CAJgB,EAQhB;AACA,GACE,aADF,EACiB,IADjB,CATgB,CAAR,CADZ,CA5aa,EA4bb,CACE,MADF,EACU,IAAIS,GAAJ,CAAQ,CAChB;AACA;AACE,GACE,cADF,EACkB,mBADlB,CAHc,EAOd;AACA,GACE,cADF,EACkB,IADlB,CARc,EAYd;AACA,GACE,oBADF,EACwB,IADxB,CAbc,CAAR,CADV,CA5ba,EAgdb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACrB;AACE,GACE,cADF,EACkB,mBADlB,CAFmB,EAMnB;AACA,GACE,aADF,EACiB,IADjB,CAPmB,CAAR,CADf,CAhda,EA6db,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACE,GACE,aADF,EACiBF,qBADjB,CAHiB,CAAR,CADb,CA7da,EAueb,CACE,OADF,EACW,IAAIE,GAAJ,CAAQ,CACf,CACE,cADF,EACkB,mBADlB,CADe,EAKf;AACA;AACA;AACA;AACA,GACE,cADF,EACkB,IADlB,CATe,EAaf;AACA;AACA,GACE,aADF,EACiB,IADjB,CAfe,CAAR,CADX,CAvea,EA6fb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACE,GACE,aADF,EACiBF,qBADjB,CAHiB,CAAR,CADb,CA7fa,EAugBb,CACE,MADF,EACU,IAAIE,GAAJ,CAAQ,CACd,CACE,cADF,EACkB,mBADlB,CADc,EAKd;AACA,GACE,cADF,EACkB,IADlB,CANc,EAUd;AACA;AACA,GACE,aADF,EACiB,IADjB,CAZc,CAAR,CADV,CAvgBa,EA0hBb,CACE,UADF,EACc,IAAIA,GAAJ,CAAQ,CAClB,CACE,cADF,EACkB,mBADlB,CADkB,EAKlB;AACA;AACA,GACE,cADF,EACkB,IADlB,CAPkB,EAWlB;AACA;AACA,GACE,aADF,EACiB,IADjB,CAbkB,CAAR,CADd,CA1hBa,EA8iBb,CACE,WADF,EACe,IAAIA,GAAJ,CAAQ,CACrB;AACA;AACE,GACE,aADF,EACiBF,qBADjB,CAHmB,CAAR,CADf,CA9iBa,EAwjBb,CACE,QADF,EACY,IAAIE,GAAJ,CAAQ,CAClB;AACE,GACE,aADF,EACiBF,qBADjB,CAFgB,CAAR,CADZ,CAxjBa,EAikBb,CACE,SADF,EACa,IAAIE,GAAJ,CAAQ,CACnB;AACE,GACE,aADF,EACiB,IADjB,CAFiB,CAAR,CADb,CAjkBa,EAykBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAClB;AACE,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CAzkBa,EAklBb,CACE,KADF,EACS,IAAIA,GAAJ,CAAQ,CACf;AACA;AACE,GACE,cADF,EACkB,MADlB,CAHa,CAAR,CADT,CAllBa,EA4lBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAClB;AACE,GACE,aADF,EACiBF,qBADjB,CAFgB,CAAR,CADZ,CA5lBa,EAqmBb,CACE,UADF,EACc,IAAIE,GAAJ,CAAQ,CAClB,CACE,cADF,EACkB,CAACR,SADnB,CADkB,EAIlB,CACE,cADF,EACkBA,SADlB,CAJkB,CAAR,CADd,CArmBa,EAgnBb,CACE,UADF,EACc,IAAIQ,GAAJ,CAAQ,CAClB,CACE,cADF,EACkBT,OAAO,GAAG,MAAH,GAAY,sBADrC,CADkB,EAKlB;AACA;AACA;AACA,GACE,aADF,EACiBM,qBAAqB,IAAIH,YAD1C,CARkB,CAAR,CADd,CAhnBa,EA+nBb,CACE,MADF,EACU,IAAIM,GAAJ,CAAQ,CAChB;AACA;AACE,GACE,cADF,EACkBT,OAAO,GAAG,sBAAH,GAA4B,KADrD,CAHc,EAOd,CACE,cADF,EACkBM,qBADlB,CAPc,EAWd;AACA,GACE,oBADF,EACwBN,OADxB,CAZc,CAAR,CADV,CA/nBa,EAkpBb,CACE,QADF,EACY,IAAIS,GAAJ,CAAQ,CAClB;AACE,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CAlpBa,EA2pBb,CACE,MADF,EACU,IAAIA,GAAJ,CAAQ,CAChB;AACA;AACE,GACE,cADF,EACkB,IADlB,CAHc,CAAR,CADV,CA3pBa,EAqqBb,CACE,SADF,EACa,IAAIA,GAAJ,CAAQ,CACnB;AACA;AACE,GACE,cADF,EACkB,mBADlB,CAHiB,EAOjB;AACA;AACA;AACA,GACE,cADF,EACkBL,mBADlB,CAViB,EAcjB;AACA;AAEA;AACA,GACE,aADF,EACiB,IADjB,CAlBiB,EAsBjB;AACA;AACA,GACE,oBADF,EACwB,CAACF,YADzB,CAxBiB,CAAR,CADb,CArqBa,EAosBb,CACE,KADF,EACS,IAAIO,GAAJ,CAAQ,CACf;AACE,GACE,cADF,EACkB,mBADlB,CAFa,EAMb;AACA,GACE,aADF,EACiB,IADjB,CAPa,CAAR,CADT,CApsBa,EAktBb,CACE,QADF,EACY,IAAIA,GAAJ,CAAQ,CAClB;AACE,GACE,aADF,EACiB,IADjB,CAFgB,CAAR,CADZ,CAltBa,EA0tBb,CACE,OADF,EACW,IAAIA,GAAJ,CAAQ,CACjB;AACE,GACE,aADF,EACiB,IADjB,CAFe,CAAR,CADX,CA1tBa,CAAR,CAAP;AAmuBD,CA7wBD;;eA+wBeX,6B","sourcesContent":["const getDefaultTagStructureForMode = (mode) => {\n const isJsdoc = mode === 'jsdoc';\n const isClosure = mode === 'closure';\n const isTypescript = mode === 'typescript';\n const isPermissive = mode === 'permissive';\n\n const isJsdocOrPermissive = isJsdoc || isPermissive;\n const isJsdocOrTypescript = isJsdoc || isTypescript;\n const isTypescriptOrClosure = isTypescript || isClosure;\n const isClosureOrPermissive = isClosure || isPermissive;\n const isJsdocTypescriptOrPermissive = isJsdocOrTypescript || isPermissive;\n\n // Properties:\n // `nameContents` - 'namepath-referencing'|'namepath-defining'|'text'|false\n // `typeAllowed` - boolean\n // `nameRequired` - boolean\n // `typeRequired` - boolean\n // `typeOrNameRequired` - boolean\n\n // All of `typeAllowed` have a signature with \"type\" except for\n // `augments`/`extends` (\"namepath\")\n // `param`/`arg`/`argument` (no signature)\n // `property`/`prop` (no signature)\n // `modifies` (undocumented)\n\n // None of the `nameContents: 'namepath-defining'` show as having curly\n // brackets for their name/namepath\n\n // Among `namepath-defining` and `namepath-referencing`, these do not seem\n // to allow curly brackets in their doc signature or examples (`modifies`\n // references namepaths within its type brackets and `param` is\n // name-defining but not namepath-defining, so not part of these groups)\n\n // Todo: Should support special processing for \"name\" as distinct from\n // \"namepath\" (e.g., param can't define a namepath)\n\n // Once checking inline tags:\n // Todo: Re: `typeOrNameRequired`, `@link` (or @linkcode/@linkplain) seems\n // to require a namepath OR URL and might be checked as such.\n // Todo: Should support a `tutorialID` type (for `@tutorial` block and\n // inline)\n\n return new Map([\n [\n 'alias', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'arg', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `param`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'argument', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `param`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'augments', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // Does not show curly brackets in either the signature or examples\n [\n 'typeAllowed', true,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'borrows', new Map([\n // `borrows` has a different format, however, so needs special parsing;\n // seems to require both, and as \"namepath\"'s\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'callback', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples)\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"namepath\"\n [\n 'nameRequired', true,\n ],\n ]),\n ],\n\n [\n 'class', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'const', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'constant', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'constructor', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'define', new Map([\n [\n 'typeRequired', isClosure,\n ],\n ]),\n ],\n\n [\n 'emits', new Map([\n // Signature seems to require a \"name\" (of an event) and no counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n ]),\n ],\n\n [\n 'enum', new Map([\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'event', new Map([\n // The doc signature of `event` seems to require a \"name\"\n [\n 'nameRequired', true,\n ],\n\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n\n [\n 'exception', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'export', new Map([\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'extends', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // Does not show curly brackets in either the signature or examples\n [\n 'typeAllowed', isTypescriptOrClosure || isPermissive,\n ],\n\n [\n 'nameRequired', isJsdoc,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', isTypescriptOrClosure || isPermissive,\n ],\n ]),\n ],\n\n [\n 'external', new Map([\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"name\" (and a special syntax for the `external` name)\n [\n 'nameRequired', true,\n ],\n ]),\n ],\n\n [\n 'fires', new Map([\n // Signature seems to require a \"name\" (of an event) and no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n ]),\n ],\n\n [\n 'function', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n [\n 'func', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n\n [\n 'host', new Map([\n // Appears to require a \"name\" in its signature, albeit somewhat\n // different from other \"name\"'s (including as described\n // at https://jsdoc.app/about-namepaths.html )\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `external`\n [\n 'nameRequired', true,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'interface', new Map([\n // Allows for \"name\" in signature, but indicates as optional\n [\n 'nameContents',\n isJsdocTypescriptOrPermissive ? 'namepath-defining' : false,\n ],\n ]),\n ],\n\n [\n 'implements', new Map([\n // Shows curly brackets in the doc signature and examples\n // \"typeExpression\"\n [\n 'typeRequired', true,\n ],\n ]),\n ],\n\n [\n 'lends', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'listens', new Map([\n // Signature seems to require a \"name\" (of an event) and no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n ]),\n ],\n\n [\n 'member', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'memberof', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples),\n // though it allows an incomplete namepath ending with connecting symbol\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n [\n 'memberof!', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples),\n // though it allows an incomplete namepath ending with connecting symbol\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'method', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n [\n 'mixes', new Map([\n // Signature seems to require a \"OtherObjectPath\" with no\n // counter-examples\n [\n 'nameContents', 'namepath-referencing',\n ],\n\n // \"OtherObjectPath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'mixin', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n ]),\n ],\n\n [\n 'modifies', new Map([\n // Has no documentation, but test example has curly brackets, and\n // \"name\" would be suggested rather than \"namepath\" based on example;\n // not sure if name is required\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'module', new Map([\n // Optional \"name\" and no curly brackets\n // this block impacts `no-undefined-types` and `valid-types` (search for\n // \"isNamepathDefiningTag|tagMightHaveNamepath|tagMightHaveEitherTypeOrNamePosition\")\n [\n 'nameContents', isJsdoc ? 'namepath-defining' : 'text',\n ],\n\n // Shows the signature with curly brackets but not in the example\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'name', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples)\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // \"namepath\"\n [\n 'nameRequired', true,\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'namespace', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Shows the signature with curly brackets but not in the example\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'package', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'param', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Though no signature provided requiring, per\n // https://jsdoc.app/tags-param.html:\n // \"The @param tag requires you to specify the name of the parameter you\n // are documenting.\"\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'private', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'prop', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // See `property`\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'property', new Map([\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // No docs indicate required, but since parallel to `param`, we treat as\n // such:\n [\n 'nameRequired', true,\n ],\n\n // Has no formal signature in the docs but shows curly brackets\n // in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'protected', new Map([\n // Shows the signature with curly brackets but not in the example\n // \"typeExpression\"\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'public', new Map([\n // Does not show a signature nor show curly brackets in the example\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'returns', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'return', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'see', new Map([\n // Signature allows for \"namepath\" or text, so user must configure to\n // 'namepath-referencing' to enforce checks\n [\n 'nameContents', 'text',\n ],\n ]),\n ],\n\n [\n 'static', new Map([\n // Does not show a signature nor show curly brackets in the example\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'suppress', new Map([\n [\n 'nameContents', !isClosure,\n ],\n [\n 'typeRequired', isClosure,\n ],\n ]),\n ],\n\n [\n 'template', new Map([\n [\n 'nameContents', isJsdoc ? 'text' : 'namepath-referencing',\n ],\n\n // Though defines `nameContents: 'namepath-defining'` in a sense, it is\n // not parseable in the same way for template (e.g., allowing commas),\n // so not adding\n [\n 'typeAllowed', isTypescriptOrClosure || isPermissive,\n ],\n ]),\n ],\n\n [\n 'this', new Map([\n // Signature seems to require a \"namepath\" (and no counter-examples)\n // Not used with namepath in Closure/TypeScript, however\n [\n 'nameContents', isJsdoc ? 'namepath-referencing' : false,\n ],\n\n [\n 'typeRequired', isTypescriptOrClosure,\n ],\n\n // namepath\n [\n 'typeOrNameRequired', isJsdoc,\n ],\n ]),\n ],\n\n [\n 'throws', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'type', new Map([\n // Shows curly brackets in the doc signature and examples\n // \"typeName\"\n [\n 'typeRequired', true,\n ],\n ]),\n ],\n\n [\n 'typedef', new Map([\n // Seems to require a \"namepath\" in the signature (with no\n // counter-examples)\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // TypeScript may allow it to be dropped if followed by @property or @member;\n // also shown as missing in Closure\n // \"namepath\"\n [\n 'nameRequired', isJsdocOrPermissive,\n ],\n\n // Is not `typeRequired` for TypeScript because it gives an error:\n // JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags.\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n\n // TypeScript may allow it to be dropped if followed by @property or @member\n // \"namepath\"\n [\n 'typeOrNameRequired', !isTypescript,\n ],\n ]),\n ],\n\n [\n 'var', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'nameContents', 'namepath-defining',\n ],\n\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'yields', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n [\n 'yield', new Map([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n ]);\n};\n\nexport default getDefaultTagStructureForMode;\n"],"file":"getDefaultTagStructureForMode.js"}
package/dist/index.js CHANGED
@@ -97,6 +97,8 @@ var _requireYields = _interopRequireDefault(require("./rules/requireYields"));
97
97
 
98
98
  var _requireYieldsCheck = _interopRequireDefault(require("./rules/requireYieldsCheck"));
99
99
 
100
+ var _sortTags = _interopRequireDefault(require("./rules/sortTags"));
101
+
100
102
  var _tagLines = _interopRequireDefault(require("./rules/tagLines"));
101
103
 
102
104
  var _validTypes = _interopRequireDefault(require("./rules/validTypes"));
@@ -154,6 +156,7 @@ var _default = {
154
156
  'jsdoc/require-throws': 'off',
155
157
  'jsdoc/require-yields': 'warn',
156
158
  'jsdoc/require-yields-check': 'warn',
159
+ 'jsdoc/sort-tags': 'off',
157
160
  'jsdoc/tag-lines': 'warn',
158
161
  'jsdoc/valid-types': 'warn'
159
162
  }
@@ -206,6 +209,7 @@ var _default = {
206
209
  'require-throws': _requireThrows.default,
207
210
  'require-yields': _requireYields.default,
208
211
  'require-yields-check': _requireYieldsCheck.default,
212
+ 'sort-tags': _sortTags.default,
209
213
  'tag-lines': _tagLines.default,
210
214
  'valid-types': _validTypes.default
211
215
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["configs","recommended","plugins","rules","checkAccess","checkAlignment","checkExamples","checkIndentation","checkLineAlignment","checkParamNames","checkPropertyNames","checkSyntax","checkTagNames","checkTypes","checkValues","emptyTags","implementsOnClasses","matchDescription","matchName","multilineBlocks","newlineAfterDescription","noBadBlocks","noDefaults","noMissingSyntax","noMultiAsterisks","noRestrictedSyntax","noTypes","noUndefinedTypes","requireAsteriskPrefix","requireDescription","requireDescriptionCompleteSentence","requireExample","requireFileOverview","requireHyphenBeforeParamDescription","requireJsdoc","requireParam","requireParamDescription","requireParamName","requireParamType","requireProperty","requirePropertyDescription","requirePropertyName","requirePropertyType","requireReturns","requireReturnsCheck","requireReturnsDescription","requireReturnsType","requireThrows","requireYields","requireYieldsCheck","tagLines","validTypes"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;eAEe;AACbA,EAAAA,OAAO,EAAE;AACPC,IAAAA,WAAW,EAAE;AACXC,MAAAA,OAAO,EAAE,CACP,OADO,CADE;AAIXC,MAAAA,KAAK,EAAE;AACL,8BAAsB,MADjB;AAEL,iCAAyB,MAFpB;AAGL,gCAAwB,KAHnB;AAIL,mCAA2B,KAJtB;AAKL,sCAA8B,KALzB;AAML,mCAA2B,MANtB;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,mBAVV;AAWL,oBAAgBC,oBAXX;AAYL,kBAAcC,kBAZT;AAaL,6BAAyBC,4BAbpB;AAcL,yBAAqBC,yBAdhB;AAeL,kBAAcC,kBAfT;AAgBL,wBAAoBC,wBAhBf;AAiBL,iCAA6BC,gCAjBxB;AAkBL,qBAAiBC,oBAlBZ;AAmBL,mBAAeC,mBAnBV;AAoBL,yBAAqBC,wBApBhB;AAqBL,0BAAsBC,yBArBjB;AAsBL,4BAAwBC,2BAtBnB;AAuBL,gBAAYC,gBAvBP;AAwBL,0BAAsBC,yBAxBjB;AAyBL,+BAA2BC,8BAzBtB;AA0BL,2BAAuBC,2BA1BlB;AA2BL,6CAAyCC,2CA3BpC;AA4BL,uBAAmBC,uBA5Bd;AA6BL,6BAAyBC,4BA7BpB;AA8BL,+CAA2CC,4CA9BtC;AA+BL,qBAAiBC,qBA/BZ;AAgCL,qBAAiBC,qBAhCZ;AAiCL,iCAA6BC,gCAjCxB;AAkCL,0BAAsBC,yBAlCjB;AAmCL,0BAAsBC,yBAnCjB;AAoCL,wBAAoBC,wBApCf;AAqCL,oCAAgCC,mCArC3B;AAsCL,6BAAyBC,4BAtCpB;AAuCL,6BAAyBC,4BAvCpB;AAwCL,uBAAmBC,uBAxCd;AAyCL,6BAAyBC,4BAzCpB;AA0CL,mCAA+BC,kCA1C1B;AA2CL,4BAAwBC,2BA3CnB;AA4CL,sBAAkBC,sBA5Cb;AA6CL,sBAAkBC,sBA7Cb;AA8CL,4BAAwBC,2BA9CnB;AA+CL,iBAAaC,iBA/CR;AAgDL,mBAAeC;AAhDV;AA1DM,C","sourcesContent":["import checkAccess from './rules/checkAccess';\nimport checkAlignment from './rules/checkAlignment';\nimport checkExamples from './rules/checkExamples';\nimport checkIndentation from './rules/checkIndentation';\nimport checkLineAlignment from './rules/checkLineAlignment';\nimport checkParamNames from './rules/checkParamNames';\nimport checkPropertyNames from './rules/checkPropertyNames';\nimport checkSyntax from './rules/checkSyntax';\nimport checkTagNames from './rules/checkTagNames';\nimport checkTypes from './rules/checkTypes';\nimport checkValues from './rules/checkValues';\nimport emptyTags from './rules/emptyTags';\nimport implementsOnClasses from './rules/implementsOnClasses';\nimport matchDescription from './rules/matchDescription';\nimport matchName from './rules/matchName';\nimport multilineBlocks from './rules/multilineBlocks';\nimport newlineAfterDescription from './rules/newlineAfterDescription';\nimport noBadBlocks from './rules/noBadBlocks';\nimport noDefaults from './rules/noDefaults';\nimport noMissingSyntax from './rules/noMissingSyntax';\nimport noMultiAsterisks from './rules/noMultiAsterisks';\nimport noRestrictedSyntax from './rules/noRestrictedSyntax';\nimport noTypes from './rules/noTypes';\nimport noUndefinedTypes from './rules/noUndefinedTypes';\nimport requireAsteriskPrefix from './rules/requireAsteriskPrefix';\nimport requireDescription from './rules/requireDescription';\nimport requireDescriptionCompleteSentence from './rules/requireDescriptionCompleteSentence';\nimport requireExample from './rules/requireExample';\nimport requireFileOverview from './rules/requireFileOverview';\nimport requireHyphenBeforeParamDescription from './rules/requireHyphenBeforeParamDescription';\nimport requireJsdoc from './rules/requireJsdoc';\nimport requireParam from './rules/requireParam';\nimport requireParamDescription from './rules/requireParamDescription';\nimport requireParamName from './rules/requireParamName';\nimport requireParamType from './rules/requireParamType';\nimport requireProperty from './rules/requireProperty';\nimport requirePropertyDescription from './rules/requirePropertyDescription';\nimport requirePropertyName from './rules/requirePropertyName';\nimport requirePropertyType from './rules/requirePropertyType';\nimport requireReturns from './rules/requireReturns';\nimport requireReturnsCheck from './rules/requireReturnsCheck';\nimport requireReturnsDescription from './rules/requireReturnsDescription';\nimport requireReturnsType from './rules/requireReturnsType';\nimport requireThrows from './rules/requireThrows';\nimport requireYields from './rules/requireYields';\nimport requireYieldsCheck from './rules/requireYieldsCheck';\nimport tagLines from './rules/tagLines';\nimport validTypes from './rules/validTypes';\n\nexport default {\n configs: {\n recommended: {\n plugins: [\n 'jsdoc',\n ],\n rules: {\n 'jsdoc/check-access': 'warn',\n 'jsdoc/check-alignment': 'warn',\n 'jsdoc/check-examples': 'off',\n 'jsdoc/check-indentation': 'off',\n 'jsdoc/check-line-alignment': 'off',\n 'jsdoc/check-param-names': 'warn',\n 'jsdoc/check-property-names': 'warn',\n 'jsdoc/check-syntax': 'off',\n 'jsdoc/check-tag-names': 'warn',\n 'jsdoc/check-types': 'warn',\n 'jsdoc/check-values': 'warn',\n 'jsdoc/empty-tags': 'warn',\n 'jsdoc/implements-on-classes': 'warn',\n 'jsdoc/match-description': 'off',\n 'jsdoc/match-name': 'off',\n 'jsdoc/multiline-blocks': 'warn',\n 'jsdoc/newline-after-description': 'warn',\n 'jsdoc/no-bad-blocks': 'off',\n 'jsdoc/no-defaults': 'off',\n 'jsdoc/no-missing-syntax': 'off',\n 'jsdoc/no-multi-asterisks': 'warn',\n 'jsdoc/no-restricted-syntax': 'off',\n 'jsdoc/no-types': 'off',\n 'jsdoc/no-undefined-types': 'warn',\n 'jsdoc/require-asterisk-prefix': 'off',\n 'jsdoc/require-description': 'off',\n 'jsdoc/require-description-complete-sentence': 'off',\n 'jsdoc/require-example': 'off',\n 'jsdoc/require-file-overview': 'off',\n 'jsdoc/require-hyphen-before-param-description': 'off',\n 'jsdoc/require-jsdoc': 'warn',\n 'jsdoc/require-param': 'warn',\n 'jsdoc/require-param-description': 'warn',\n 'jsdoc/require-param-name': 'warn',\n 'jsdoc/require-param-type': 'warn',\n 'jsdoc/require-property': 'warn',\n 'jsdoc/require-property-description': 'warn',\n 'jsdoc/require-property-name': 'warn',\n 'jsdoc/require-property-type': 'warn',\n 'jsdoc/require-returns': 'warn',\n 'jsdoc/require-returns-check': 'warn',\n 'jsdoc/require-returns-description': 'warn',\n 'jsdoc/require-returns-type': 'warn',\n 'jsdoc/require-throws': 'off',\n 'jsdoc/require-yields': 'warn',\n 'jsdoc/require-yields-check': 'warn',\n 'jsdoc/tag-lines': 'warn',\n 'jsdoc/valid-types': 'warn',\n },\n },\n },\n rules: {\n 'check-access': checkAccess,\n 'check-alignment': checkAlignment,\n 'check-examples': checkExamples,\n 'check-indentation': checkIndentation,\n 'check-line-alignment': checkLineAlignment,\n 'check-param-names': checkParamNames,\n 'check-property-names': checkPropertyNames,\n 'check-syntax': checkSyntax,\n 'check-tag-names': checkTagNames,\n 'check-types': checkTypes,\n 'check-values': checkValues,\n 'empty-tags': emptyTags,\n 'implements-on-classes': implementsOnClasses,\n 'match-description': matchDescription,\n 'match-name': matchName,\n 'multiline-blocks': multilineBlocks,\n 'newline-after-description': newlineAfterDescription,\n 'no-bad-blocks': noBadBlocks,\n 'no-defaults': noDefaults,\n 'no-missing-syntax': noMissingSyntax,\n 'no-multi-asterisks': noMultiAsterisks,\n 'no-restricted-syntax': noRestrictedSyntax,\n 'no-types': noTypes,\n 'no-undefined-types': noUndefinedTypes,\n 'require-asterisk-prefix': requireAsteriskPrefix,\n 'require-description': requireDescription,\n 'require-description-complete-sentence': requireDescriptionCompleteSentence,\n 'require-example': requireExample,\n 'require-file-overview': requireFileOverview,\n 'require-hyphen-before-param-description': requireHyphenBeforeParamDescription,\n 'require-jsdoc': requireJsdoc,\n 'require-param': requireParam,\n 'require-param-description': requireParamDescription,\n 'require-param-name': requireParamName,\n 'require-param-type': requireParamType,\n 'require-property': requireProperty,\n 'require-property-description': requirePropertyDescription,\n 'require-property-name': requirePropertyName,\n 'require-property-type': requirePropertyType,\n 'require-returns': requireReturns,\n 'require-returns-check': requireReturnsCheck,\n 'require-returns-description': requireReturnsDescription,\n 'require-returns-type': requireReturnsType,\n 'require-throws': requireThrows,\n 'require-yields': requireYields,\n 'require-yields-check': requireYieldsCheck,\n 'tag-lines': tagLines,\n 'valid-types': validTypes,\n },\n};\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.js"],"names":["configs","recommended","plugins","rules","checkAccess","checkAlignment","checkExamples","checkIndentation","checkLineAlignment","checkParamNames","checkPropertyNames","checkSyntax","checkTagNames","checkTypes","checkValues","emptyTags","implementsOnClasses","matchDescription","matchName","multilineBlocks","newlineAfterDescription","noBadBlocks","noDefaults","noMissingSyntax","noMultiAsterisks","noRestrictedSyntax","noTypes","noUndefinedTypes","requireAsteriskPrefix","requireDescription","requireDescriptionCompleteSentence","requireExample","requireFileOverview","requireHyphenBeforeParamDescription","requireJsdoc","requireParam","requireParamDescription","requireParamName","requireParamType","requireProperty","requirePropertyDescription","requirePropertyName","requirePropertyType","requireReturns","requireReturnsCheck","requireReturnsDescription","requireReturnsType","requireThrows","requireYields","requireYieldsCheck","sortTags","tagLines","validTypes"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;eAEe;AACbA,EAAAA,OAAO,EAAE;AACPC,IAAAA,WAAW,EAAE;AACXC,MAAAA,OAAO,EAAE,CACP,OADO,CADE;AAIXC,MAAAA,KAAK,EAAE;AACL,8BAAsB,MADjB;AAEL,iCAAyB,MAFpB;AAGL,gCAAwB,KAHnB;AAIL,mCAA2B,KAJtB;AAKL,sCAA8B,KALzB;AAML,mCAA2B,MANtB;AAOL,sCAA8B,MAPzB;AAQL,8BAAsB,KARjB;AASL,iCAAyB,MATpB;AAUL,6BAAqB,MAVhB;AAWL,8BAAsB,MAXjB;AAYL,4BAAoB,MAZf;AAaL,uCAA+B,MAb1B;AAcL,mCAA2B,KAdtB;AAeL,4BAAoB,KAff;AAgBL,kCAA0B,MAhBrB;AAiBL,2CAAmC,MAjB9B;AAkBL,+BAAuB,KAlBlB;AAmBL,6BAAqB,KAnBhB;AAoBL,mCAA2B,KApBtB;AAqBL,oCAA4B,MArBvB;AAsBL,sCAA8B,KAtBzB;AAuBL,0BAAkB,KAvBb;AAwBL,o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AA2BC,8BAzBtB;AA0BL,2BAAuBC,2BA1BlB;AA2BL,6CAAyCC,2CA3BpC;AA4BL,uBAAmBC,uBA5Bd;AA6BL,6BAAyBC,4BA7BpB;AA8BL,+CAA2CC,4CA9BtC;AA+BL,qBAAiBC,qBA/BZ;AAgCL,qBAAiBC,qBAhCZ;AAiCL,iCAA6BC,gCAjCxB;AAkCL,0BAAsBC,yBAlCjB;AAmCL,0BAAsBC,yBAnCjB;AAoCL,wBAAoBC,wBApCf;AAqCL,oCAAgCC,mCArC3B;AAsCL,6BAAyBC,4BAtCpB;AAuCL,6BAAyBC,4BAvCpB;AAwCL,uBAAmBC,uBAxCd;AAyCL,6BAAyBC,4BAzCpB;AA0CL,mCAA+BC,kCA1C1B;AA2CL,4BAAwBC,2BA3CnB;AA4CL,sBAAkBC,sBA5Cb;AA6CL,sBAAkBC,sBA7Cb;AA8CL,4BAAwBC,2BA9CnB;AA+CL,iBAAaC,iBA/CR;AAgDL,iBAAaC,iBAhDR;AAiDL,mBAAeC;AAjDV;AA3DM,C","sourcesContent":["import checkAccess from './rules/checkAccess';\nimport checkAlignment from './rules/checkAlignment';\nimport checkExamples from './rules/checkExamples';\nimport checkIndentation from './rules/checkIndentation';\nimport checkLineAlignment from './rules/checkLineAlignment';\nimport checkParamNames from './rules/checkParamNames';\nimport checkPropertyNames from './rules/checkPropertyNames';\nimport checkSyntax from './rules/checkSyntax';\nimport checkTagNames from './rules/checkTagNames';\nimport checkTypes from './rules/checkTypes';\nimport checkValues from './rules/checkValues';\nimport emptyTags from './rules/emptyTags';\nimport implementsOnClasses from './rules/implementsOnClasses';\nimport matchDescription from './rules/matchDescription';\nimport matchName from './rules/matchName';\nimport multilineBlocks from './rules/multilineBlocks';\nimport newlineAfterDescription from './rules/newlineAfterDescription';\nimport noBadBlocks from './rules/noBadBlocks';\nimport noDefaults from './rules/noDefaults';\nimport noMissingSyntax from './rules/noMissingSyntax';\nimport noMultiAsterisks from './rules/noMultiAsterisks';\nimport noRestrictedSyntax from './rules/noRestrictedSyntax';\nimport noTypes from './rules/noTypes';\nimport noUndefinedTypes from './rules/noUndefinedTypes';\nimport requireAsteriskPrefix from './rules/requireAsteriskPrefix';\nimport requireDescription from './rules/requireDescription';\nimport requireDescriptionCompleteSentence from './rules/requireDescriptionCompleteSentence';\nimport requireExample from './rules/requireExample';\nimport requireFileOverview from './rules/requireFileOverview';\nimport requireHyphenBeforeParamDescription from './rules/requireHyphenBeforeParamDescription';\nimport requireJsdoc from './rules/requireJsdoc';\nimport requireParam from './rules/requireParam';\nimport requireParamDescription from './rules/requireParamDescription';\nimport requireParamName from './rules/requireParamName';\nimport requireParamType from './rules/requireParamType';\nimport requireProperty from './rules/requireProperty';\nimport requirePropertyDescription from './rules/requirePropertyDescription';\nimport requirePropertyName from './rules/requirePropertyName';\nimport requirePropertyType from './rules/requirePropertyType';\nimport requireReturns from './rules/requireReturns';\nimport requireReturnsCheck from './rules/requireReturnsCheck';\nimport requireReturnsDescription from './rules/requireReturnsDescription';\nimport requireReturnsType from './rules/requireReturnsType';\nimport requireThrows from './rules/requireThrows';\nimport requireYields from './rules/requireYields';\nimport requireYieldsCheck from './rules/requireYieldsCheck';\nimport sortTags from './rules/sortTags';\nimport tagLines from './rules/tagLines';\nimport validTypes from './rules/validTypes';\n\nexport default {\n configs: {\n recommended: {\n plugins: [\n 'jsdoc',\n ],\n rules: {\n 'jsdoc/check-access': 'warn',\n 'jsdoc/check-alignment': 'warn',\n 'jsdoc/check-examples': 'off',\n 'jsdoc/check-indentation': 'off',\n 'jsdoc/check-line-alignment': 'off',\n 'jsdoc/check-param-names': 'warn',\n 'jsdoc/check-property-names': 'warn',\n 'jsdoc/check-syntax': 'off',\n 'jsdoc/check-tag-names': 'warn',\n 'jsdoc/check-types': 'warn',\n 'jsdoc/check-values': 'warn',\n 'jsdoc/empty-tags': 'warn',\n 'jsdoc/implements-on-classes': 'warn',\n 'jsdoc/match-description': 'off',\n 'jsdoc/match-name': 'off',\n 'jsdoc/multiline-blocks': 'warn',\n 'jsdoc/newline-after-description': 'warn',\n 'jsdoc/no-bad-blocks': 'off',\n 'jsdoc/no-defaults': 'off',\n 'jsdoc/no-missing-syntax': 'off',\n 'jsdoc/no-multi-asterisks': 'warn',\n 'jsdoc/no-restricted-syntax': 'off',\n 'jsdoc/no-types': 'off',\n 'jsdoc/no-undefined-types': 'warn',\n 'jsdoc/require-asterisk-prefix': 'off',\n 'jsdoc/require-description': 'off',\n 'jsdoc/require-description-complete-sentence': 'off',\n 'jsdoc/require-example': 'off',\n 'jsdoc/require-file-overview': 'off',\n 'jsdoc/require-hyphen-before-param-description': 'off',\n 'jsdoc/require-jsdoc': 'warn',\n 'jsdoc/require-param': 'warn',\n 'jsdoc/require-param-description': 'warn',\n 'jsdoc/require-param-name': 'warn',\n 'jsdoc/require-param-type': 'warn',\n 'jsdoc/require-property': 'warn',\n 'jsdoc/require-property-description': 'warn',\n 'jsdoc/require-property-name': 'warn',\n 'jsdoc/require-property-type': 'warn',\n 'jsdoc/require-returns': 'warn',\n 'jsdoc/require-returns-check': 'warn',\n 'jsdoc/require-returns-description': 'warn',\n 'jsdoc/require-returns-type': 'warn',\n 'jsdoc/require-throws': 'off',\n 'jsdoc/require-yields': 'warn',\n 'jsdoc/require-yields-check': 'warn',\n 'jsdoc/sort-tags': 'off',\n 'jsdoc/tag-lines': 'warn',\n 'jsdoc/valid-types': 'warn',\n },\n },\n },\n rules: {\n 'check-access': checkAccess,\n 'check-alignment': checkAlignment,\n 'check-examples': checkExamples,\n 'check-indentation': checkIndentation,\n 'check-line-alignment': checkLineAlignment,\n 'check-param-names': checkParamNames,\n 'check-property-names': checkPropertyNames,\n 'check-syntax': checkSyntax,\n 'check-tag-names': checkTagNames,\n 'check-types': checkTypes,\n 'check-values': checkValues,\n 'empty-tags': emptyTags,\n 'implements-on-classes': implementsOnClasses,\n 'match-description': matchDescription,\n 'match-name': matchName,\n 'multiline-blocks': multilineBlocks,\n 'newline-after-description': newlineAfterDescription,\n 'no-bad-blocks': noBadBlocks,\n 'no-defaults': noDefaults,\n 'no-missing-syntax': noMissingSyntax,\n 'no-multi-asterisks': noMultiAsterisks,\n 'no-restricted-syntax': noRestrictedSyntax,\n 'no-types': noTypes,\n 'no-undefined-types': noUndefinedTypes,\n 'require-asterisk-prefix': requireAsteriskPrefix,\n 'require-description': requireDescription,\n 'require-description-complete-sentence': requireDescriptionCompleteSentence,\n 'require-example': requireExample,\n 'require-file-overview': requireFileOverview,\n 'require-hyphen-before-param-description': requireHyphenBeforeParamDescription,\n 'require-jsdoc': requireJsdoc,\n 'require-param': requireParam,\n 'require-param-description': requireParamDescription,\n 'require-param-name': requireParamName,\n 'require-param-type': requireParamType,\n 'require-property': requireProperty,\n 'require-property-description': requirePropertyDescription,\n 'require-property-name': requirePropertyName,\n 'require-property-type': requirePropertyType,\n 'require-returns': requireReturns,\n 'require-returns-check': requireReturnsCheck,\n 'require-returns-description': requireReturnsDescription,\n 'require-returns-type': requireReturnsType,\n 'require-throws': requireThrows,\n 'require-yields': requireYields,\n 'require-yields-check': requireYieldsCheck,\n 'sort-tags': sortTags,\n 'tag-lines': tagLines,\n 'valid-types': validTypes,\n },\n};\n"],"file":"index.js"}
@@ -247,13 +247,17 @@ const getUtils = (node, jsdoc, jsdocNode, settings, report, context, iteratingAl
247
247
 
248
248
  for (const [idx, src] of jsdoc.source.slice(lastIndex).entries()) {
249
249
  src.number = firstNumber + lastIndex + idx;
250
- }
250
+ } // Todo: Once rewiring of tags may be fixed in comment-parser to reflect missing tags,
251
+ // this step should be added here (so that, e.g., if accessing `jsdoc.tags`,
252
+ // such as to add a new tag, the correct information will be available)
253
+
251
254
  };
252
255
 
253
- utils.addTag = targetTagName => {
256
+ utils.addTag = (targetTagName, number = (() => {
254
257
  var _jsdoc$tags$source$0$, _jsdoc$tags, _jsdoc$tags$source$;
255
258
 
256
- const number = ((_jsdoc$tags$source$0$ = (_jsdoc$tags = jsdoc.tags[jsdoc.tags.length - 1]) === null || _jsdoc$tags === void 0 ? void 0 : (_jsdoc$tags$source$ = _jsdoc$tags.source[0]) === null || _jsdoc$tags$source$ === void 0 ? void 0 : _jsdoc$tags$source$.number) !== null && _jsdoc$tags$source$0$ !== void 0 ? _jsdoc$tags$source$0$ : 0) + 1;
259
+ return (_jsdoc$tags$source$0$ = (_jsdoc$tags = jsdoc.tags[jsdoc.tags.length - 1]) === null || _jsdoc$tags === void 0 ? void 0 : (_jsdoc$tags$source$ = _jsdoc$tags.source[0]) === null || _jsdoc$tags$source$ === void 0 ? void 0 : _jsdoc$tags$source$.number) !== null && _jsdoc$tags$source$0$ !== void 0 ? _jsdoc$tags$source$0$ : 0;
260
+ })() + 1, tokens = {}) => {
257
261
  jsdoc.source.splice(number, 0, {
258
262
  number,
259
263
  source: '',
@@ -261,7 +265,8 @@ const getUtils = (node, jsdoc, jsdocNode, settings, report, context, iteratingAl
261
265
  delimiter: '*',
262
266
  postDelimiter: ' ',
263
267
  start: indent + ' ',
264
- tag: `@${targetTagName}`
268
+ tag: `@${targetTagName}`,
269
+ ...tokens
265
270
  })
266
271
  });
267
272
 
@@ -270,6 +275,24 @@ const getUtils = (node, jsdoc, jsdocNode, settings, report, context, iteratingAl
270
275
  }
271
276
  };
272
277
 
278
+ utils.getFirstLine = () => {
279
+ let firstLine;
280
+
281
+ for (const {
282
+ number,
283
+ tokens: {
284
+ tag
285
+ }
286
+ } of jsdoc.source) {
287
+ if (tag) {
288
+ firstLine = number;
289
+ break;
290
+ }
291
+ }
292
+
293
+ return firstLine;
294
+ };
295
+
273
296
  utils.seedTokens = seedTokens;
274
297
 
275
298
  utils.emptyTokens = tokens => {
@@ -286,8 +309,13 @@ const getUtils = (node, jsdoc, jsdocNode, settings, report, context, iteratingAl
286
309
  number,
287
310
  source: '',
288
311
  tokens: seedTokens(tokens)
289
- }); // If necessary, we can rewire the tags (misnamed method)
312
+ });
313
+
314
+ for (const src of jsdoc.source.slice(number + 1)) {
315
+ src.number++;
316
+ } // If necessary, we can rewire the tags (misnamed method)
290
317
  // rewireSource(jsdoc);
318
+
291
319
  };
292
320
 
293
321
  utils.addLines = (tagIndex, tagSourceOffset, numLines) => {