eslint-plugin-jsdoc 44.2.0 → 44.2.2

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.
package/README.md CHANGED
@@ -208,6 +208,11 @@ See [Advanced](./docs/advanced.md#readme).
208
208
 
209
209
  Problems reported by rules which have a wrench :wrench: below can be fixed automatically by running ESLint on the command line with `--fix` option.
210
210
 
211
+ Note that a number of fixable rules have an `enableFixer` option which can
212
+ be set to `false` to disable the fixer (or in the case of `check-param-names`,
213
+ `check-property-names`, and `no-blank-blocks`, set to `true` to enable a
214
+ non-default-recommended fixer).
215
+
211
216
  |recommended|fixable|rule|description|
212
217
  |-|-|-|-|
213
218
  |:heavy_check_mark:|| [check-access](./docs/rules/check-access.md#readme) | Enforces valid `@access` tags|
@@ -45,7 +45,7 @@ const getDefaultTagStructureForMode = mode => {
45
45
 
46
46
  return new Map([['alias', new Map([
47
47
  // Signature seems to require a "namepath" (and no counter-examples)
48
- ['namepathRole', 'namepath-referencing'],
48
+ ['namepathRole', 'namepath-defining'],
49
49
  // "namepath"
50
50
  ['typeOrNameRequired', true]])], ['arg', new Map([['namepathRole', 'namepath-defining'],
51
51
  // See `param`
@@ -1 +1 @@
1
- {"version":3,"file":"getDefaultTagStructureForMode.js","names":["getDefaultTagStructureForMode","mode","isJsdoc","isClosure","isTypescript","isPermissive","isJsdocOrPermissive","isJsdocOrTypescript","isTypescriptOrClosure","isClosureOrPermissive","isJsdocTypescriptOrPermissive","Map","_default","exports","default","module"],"sources":["../src/getDefaultTagStructureForMode.js"],"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 // `namepathRole` - 'namepath-referencing'|'namepath-defining'|'namepath-or-url-referencing'|'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 `namepathRole: '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: 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 'namepathRole', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'arg', new Map([\n [\n 'namepathRole', '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 'namepathRole', '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 'namepathRole', '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 'namepathRole', '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); TypeScript does not enforce but seems\n // problematic as not attached so presumably not useable without it\n [\n 'namepathRole', '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 'namepathRole', 'namepath-defining',\n ],\n\n // Not in use, but should be this value if using to power `empty-tags`\n [\n 'nameAllowed', true,\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 'namepathRole', '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 'namepathRole', '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 'namepathRole', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'constructs', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'namepathRole', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\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 'namepathRole', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\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 'namepathRole', '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 // Closure\n [\n 'export', new Map([\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'exports', new Map([\n [\n 'namepathRole', 'namepath-defining',\n ],\n\n [\n 'nameRequired', isJsdoc,\n ],\n\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 'namepathRole', '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 'namepathRole', 'namepath-defining',\n ],\n\n // \"name\" (and a special syntax for the `external` name)\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\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 'namepathRole', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'function', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'namepathRole', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n [\n 'func', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'namepathRole', '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 'namepathRole', 'namepath-defining',\n ],\n\n // See `external`\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'interface', new Map([\n // Allows for \"name\" in signature, but indicates as optional\n [\n 'namepathRole',\n isJsdocTypescriptOrPermissive ? 'namepath-defining' : false,\n ],\n\n // Not in use, but should be this value if using to power `empty-tags`\n [\n 'nameAllowed', isClosure,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'internal', new Map([\n // https://www.typescriptlang.org/tsconfig/#stripInternal\n [\n 'namepathRole', false,\n ],\n // Not in use, but should be this value if using to power `empty-tags`\n [\n 'nameAllowed', 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 'namepathRole', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'link', new Map([\n // Signature seems to require a namepath OR URL and might be checked as such.\n [\n 'namepathRole', 'namepath-or-url-referencing',\n ],\n\n ]),\n ],\n\n [\n 'linkcode', new Map([\n // Synonym for \"link\"\n // Signature seems to require a namepath OR URL and might be checked as such.\n [\n 'namepathRole', 'namepath-or-url-referencing',\n ],\n ]),\n ],\n\n [\n 'linkplain', new Map([\n // Synonym for \"link\"\n // Signature seems to require a namepath OR URL and might be checked as such.\n [\n 'namepathRole', 'namepath-or-url-referencing',\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 'namepathRole', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'member', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'namepathRole', '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 'namepathRole', '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 'namepathRole', '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 'namepathRole', 'namepath-defining',\n ],\n ]),\n ],\n [\n 'mixes', new Map([\n // Signature seems to require a \"OtherObjectPath\" with no\n // counter-examples\n [\n 'namepathRole', '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 'namepathRole', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\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 'namepathRole', 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 'namepathRole', '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 'namepathRole', '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 'namepathRole', '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 'namepathRole', '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 'namepathRole', '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 'requires', new Map([\n // <someModuleName>\n [\n 'namepathRole', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\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 'satisfies', new Map([\n // Shows curly brackets in the doc signature and examples\n [\n 'typeRequired', 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 'namepathRole', '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 'namepathRole', !isClosure,\n ],\n [\n 'typeRequired', isClosure,\n ],\n ]),\n ],\n\n [\n 'template', new Map([\n [\n 'namepathRole', isJsdoc ? 'text' : 'namepath-referencing',\n ],\n\n // Though defines `namepathRole: '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 'namepathRole', 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 'tutorial', new Map([\n // (a tutorial ID)\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\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 'namepathRole', '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 'namepathRole', '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"],"mappings":";;;;;;AAAA,MAAMA,6BAA6B,GAAIC,IAAI,IAAK;EAC9C,MAAMC,OAAO,GAAGD,IAAI,KAAK,OAAO;EAChC,MAAME,SAAS,GAAGF,IAAI,KAAK,SAAS;EACpC,MAAMG,YAAY,GAAGH,IAAI,KAAK,YA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AAE,IAAI,CACpB,CACF,CAAC,CACH,EAED,CACE,OAAO,EAAE,IAAIA,GAAG,CAAC;EACf;EACA,CACE,cAAc,EAAE,IAAI,CACrB;EAED;EACA;EACA;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC,CACF,CAAC,CACH,EAED,CACE,WAAW,EAAE,IAAIA,GAAG,CAAC;EACnB;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH;EAED;EACA,CACE,QAAQ,EAAE,IAAIA,GAAG,CAAC,CAChB,CACE,aAAa,EAAEF,qBAAqB,CACrC,CACF,CAAC,CACH,EAED,CACE,SAAS,EAAE,IAAIE,GAAG,CAAC,CACjB,CACE,cAAc,EAAE,mBAAmB,CACpC,EAED,CACE,cAAc,EAAET,OAAO,CACxB,EAED,CACE,aAAa,EAAEO,qBAAqB,CACrC,CACF,CAAC,CACH,EAED,CACE,SAAS,EAAE,IAAIE,GAAG,CAAC;EACjB;EACA,CACE,cAAc,EAAE,sBAAsB,CACvC;EAED;EACA,CACE,aAAa,EAAEH,qBAAqB,IAAIH,YAAY,CACrD,EAED,CACE,cAAc,EAAEH,OAAO,CACxB;EAED;EACA,CACE,oBAAoB,EAAEM,qBAAqB,IAAIH,YAAY,CAC5D,CACF,CAAC,CACH,EAED,CACE,UAAU,EAAE,IAAIM,GAAG,CAAC;EAClB;EACA;EACA;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA,CACE,cAAc,EAAE,IAAI,CACrB,EAED,CACE,aAAa,EAAE,KAAK,CACrB,CACF,CAAC,CACH,EAED,CACE,OAAO,EAAE,IAAIA,GAAG,CAAC;EACf;EACA;EACA,CACE,cAAc,EAAE,sBAAsB,CACvC,EAED,CACE,cAAc,EAAE,IAAI,CACrB,EAED,CACE,aAAa,EAAE,KAAK,CACrB,CACF,CAAC,CACH,EAED,CACE,UAAU,EAAE,IAAIA,GAAG,CAAC;EAClB;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC,EAED,CACE,c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vD;EAED;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EAED,CACE,MAAM,EAAE,IAAIS,GAAG,CAAC;EACd;EACA;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA,CACE,cAAc,EAAE,IAAI,CACrB;EAED;EACA,CACE,oBAAoB,EAAE,IAAI,CAC3B,CACF,CAAC,CACH,EAED,CACE,WAAW,EAAE,IAAIA,GAAG,CAAC;EACnB;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EACD,CACE,SAAS,EAAE,IAAIA,GAAG,CAAC;EACjB;EACA;EACA,CACE,aAAa,EAAEF,qBAAqB,CACrC,CACF,CAAC,CACH,EAED,CACE,OAAO,EAAE,IAAIE,GAAG,CAAC,CACf,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA;EACA;EACA;EACA,CACE,cAAc,EAAE,IAAI,CACrB;EAED;EACA;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EAED,CACE,SAAS,EAAE,IAAIA,GAAG,CAAC;EACjB;EACA;EACA,CACE,aAAa,EAAEF,qBAAqB,CACrC,CACF,CAAC,CACH,EAED,CACE,MAAM,EAAE,IAAIE,GAAG,CAAC,CACd,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA,CACE,cAAc,EAAE,IAAI,CACrB;EAED;EACA;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EAED,CACE,UAAU,EAAE,IAAIA,GAAG,CAAC,CAClB,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA;EACA,CACE,cAAc,EAAE,IAAI,CACrB;EAED;EACA;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EAED,CACE,WAAW,EAAE,IAAIA,GAAG,CAAC;EACnB;EACA;EACA,CACE,aAAa,EAAEF,qBAAqB,CACrC,CACF,CAAC,C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ED;EACA,CACE,oBAAoB,EAAEN,OAAO,CAC9B,CACF,CAAC,CACH,EAED,CACE,QAAQ,EAAE,IAAIS,GAAG,CAAC;EAChB;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EAED,CACE,UAAU,EAAE,IAAIA,GAAG,CAAC;EAClB;EACA,CACE,cAAc,EAAE,IAAI,CACrB,EAED,CACE,aAAa,EAAE,KAAK,CACrB,CACF,CAAC,CACH,EAED,CACE,MAAM,EAAE,IAAIA,GAAG,CAAC;EACd;EACA;EACA,CACE,cAAc,EAAE,IAAI,CACrB,CACF,CAAC,CACH,EAED,CACE,SAAS,EAAE,IAAIA,GAAG,CAAC;EACjB;EACA;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA;EACA;EACA,CACE,cAAc,EAAEL,mBAAmB,CACpC;EAED;EACA;;EAEA;EACA,CACE,aAAa,EAAE,IAAI,CACpB;EAED;EACA;EACA,CACE,oBAAoB,EAAE,CAACF,YAAY,CACpC,CACF,CAAC,CACH,EAED,CACE,KAAK,EAAE,IAAIO,GAAG,CAAC;EACb;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EAED,CACE,QAAQ,EAAE,IAAIA,GAAG,CAAC;EAChB;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EACD,CACE,OAAO,EAAE,IAAIA,GAAG,CAAC;EACf;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,CACF,CAAC;AACJ,CAAC;AAAC,IAAAC,QAAA,GAEaZ,6BAA6B;AAAAa,OAAA,CAAAC,OAAA,GAAAF,QAAA;AAAAG,MAAA,CAAAF,OAAA,GAAAA,OAAA,CAAAC,OAAA"}
1
+ {"version":3,"file":"getDefaultTagStructureForMode.js","names":["getDefaultTagStructureForMode","mode","isJsdoc","isClosure","isTypescript","isPermissive","isJsdocOrPermissive","isJsdocOrTypescript","isTypescriptOrClosure","isClosureOrPermissive","isJsdocTypescriptOrPermissive","Map","_default","exports","default","module"],"sources":["../src/getDefaultTagStructureForMode.js"],"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 // `namepathRole` - 'namepath-referencing'|'namepath-defining'|'namepath-or-url-referencing'|'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 `namepathRole: '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: 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 'namepathRole', 'namepath-defining',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'arg', new Map([\n [\n 'namepathRole', '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 'namepathRole', '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 'namepathRole', '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 'namepathRole', '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); TypeScript does not enforce but seems\n // problematic as not attached so presumably not useable without it\n [\n 'namepathRole', '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 'namepathRole', 'namepath-defining',\n ],\n\n // Not in use, but should be this value if using to power `empty-tags`\n [\n 'nameAllowed', true,\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 'namepathRole', '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 'namepathRole', '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 'namepathRole', 'namepath-defining',\n ],\n\n [\n 'typeAllowed', true,\n ],\n ]),\n ],\n\n [\n 'constructs', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'namepathRole', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\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 'namepathRole', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\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 'namepathRole', '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 // Closure\n [\n 'export', new Map([\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ]),\n ],\n\n [\n 'exports', new Map([\n [\n 'namepathRole', 'namepath-defining',\n ],\n\n [\n 'nameRequired', isJsdoc,\n ],\n\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 'namepathRole', '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 'namepathRole', 'namepath-defining',\n ],\n\n // \"name\" (and a special syntax for the `external` name)\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\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 'namepathRole', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'function', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'namepathRole', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n [\n 'func', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'namepathRole', '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 'namepathRole', 'namepath-defining',\n ],\n\n // See `external`\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'interface', new Map([\n // Allows for \"name\" in signature, but indicates as optional\n [\n 'namepathRole',\n isJsdocTypescriptOrPermissive ? 'namepath-defining' : false,\n ],\n\n // Not in use, but should be this value if using to power `empty-tags`\n [\n 'nameAllowed', isClosure,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'internal', new Map([\n // https://www.typescriptlang.org/tsconfig/#stripInternal\n [\n 'namepathRole', false,\n ],\n // Not in use, but should be this value if using to power `empty-tags`\n [\n 'nameAllowed', 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 'namepathRole', 'namepath-referencing',\n ],\n\n // \"namepath\"\n [\n 'typeOrNameRequired', true,\n ],\n ]),\n ],\n\n [\n 'link', new Map([\n // Signature seems to require a namepath OR URL and might be checked as such.\n [\n 'namepathRole', 'namepath-or-url-referencing',\n ],\n\n ]),\n ],\n\n [\n 'linkcode', new Map([\n // Synonym for \"link\"\n // Signature seems to require a namepath OR URL and might be checked as such.\n [\n 'namepathRole', 'namepath-or-url-referencing',\n ],\n ]),\n ],\n\n [\n 'linkplain', new Map([\n // Synonym for \"link\"\n // Signature seems to require a namepath OR URL and might be checked as such.\n [\n 'namepathRole', 'namepath-or-url-referencing',\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 'namepathRole', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ]),\n ],\n\n [\n 'member', new Map([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'namepathRole', '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 'namepathRole', '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 'namepathRole', '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 'namepathRole', 'namepath-defining',\n ],\n ]),\n ],\n [\n 'mixes', new Map([\n // Signature seems to require a \"OtherObjectPath\" with no\n // counter-examples\n [\n 'namepathRole', '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 'namepathRole', 'namepath-defining',\n ],\n\n [\n 'nameRequired', false,\n ],\n\n [\n 'typeAllowed', false,\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 'namepathRole', 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 'namepathRole', '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 'namepathRole', '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 'namepathRole', '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 'namepathRole', '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 'namepathRole', '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 'requires', new Map([\n // <someModuleName>\n [\n 'namepathRole', 'namepath-referencing',\n ],\n\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\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 'satisfies', new Map([\n // Shows curly brackets in the doc signature and examples\n [\n 'typeRequired', 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 'namepathRole', '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 'namepathRole', !isClosure,\n ],\n [\n 'typeRequired', isClosure,\n ],\n ]),\n ],\n\n [\n 'template', new Map([\n [\n 'namepathRole', isJsdoc ? 'text' : 'namepath-referencing',\n ],\n\n // Though defines `namepathRole: '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 'namepathRole', 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 'tutorial', new Map([\n // (a tutorial ID)\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\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 'namepathRole', '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 'namepathRole', '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"],"mappings":";;;;;;AAAA,MAAMA,6BAA6B,GAAIC,IAAI,IAAK;EAC9C,MAAMC,OAAO,GAAGD,IAAI,KAAK,OAAO;EAChC,MAAME,SAAS,GAAGF,IAAI,KAAK,SAAS;EACpC,MAAMG,YAAY,GAAGH,IAAI,KAAK,YAAY;EAC1C,MAAMI,YAAY,GAAGJ,IAAI,KAAK,YAAY;EAE1C,MAAMK,mBAAmB,GAAGJ,OAAO,IAAIG,YAAY;EACnD,MAAME,mBAAmB,GAAGL,OAAO,IAAIE,YAAY;EACnD,MAAMI,qBAAqB,GAAGJ,YAAY,IAAID,SAAS;EACvD,MAAMM,qBAAqB,GAAGN,SAAS,IAAIE,YAAY;EACvD,MAAMK,6BAA6B,GAAGH,mBAAmB,IAAIF,YAAY;;EAEzE;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;;EAEA;EACA;;EAEA;EACA;EACA;EACA;;EAEA;EACA;;EAEA;EACA;EACA;;EAEA,OAAO,IAAIM,GAAG,CAAC,CACb,CACE,OAAO,EAAE,IAAIA,GAAG,CAAC;EACf;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA,CACE,oBAAoB,EAAE,IAAI,CAC3B,CACF,CAAC,CACH,EAED,CACE,KAAK,EAAE,IAAIA,GAAG,CAAC,CACb,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA,CACE,cAAc,EAAE,IAAI,CACrB;EAED;EACA;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EAED,CACE,UAAU,EAAE,IAAIA,GAAG,CAAC,CAClB,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA,CACE,cAAc,EAAE,IAAI,CACrB;EAED;EACA;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EAED,CACE,UAAU,EAAE,IAAIA,GAAG,CAAC;EAClB;EACA,CACE,cAAc,EAAE,sBAAsB,CACvC;EAED;EACA,CACE,aAAa,EAAE,IAAI,CACpB;EAED;EACA,CACE,oBAAoB,EAAE,IAAI,CAC3B,CACF,CAAC,CACH,EAED,CACE,SAAS,EAAE,IAAIA,GAAG,CAAC;EACjB;EACA;EACA,CACE,cAAc,EAAE,sBAAsB,CACvC;EAED;EACA,CACE,oBAAoB,EAAE,IAAI,CAC3B,CACF,CAAC,CACH,EAED,CACE,UAAU,EAAE,IAAIA,GAAG,CAAC;EAClB;EACA;EACA;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA,CACE,cAAc,EAAE,IAAI,CACrB,CACF,CAAC,CACH,EAED,CACE,OAAO,EAAE,IAAIA,GAAG,CAAC;EACf;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA,CACE,aAAa,EAAE,IAAI,CACpB,EAED,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EAED,CACE,OAAO,EAAE,IAAIA,GAAG,CAAC;EACf;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC,EAED,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EACD,CACE,UAAU,EAAE,IAAIA,GAAG,CAAC;EAClB;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC,EAED,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EACD,CACE,aAAa,EAAE,IAAIA,GAAG,CAAC;EACrB;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC,EAED,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EAED,CACE,YAAY,EAAE,IAAIA,GAAG,CAAC;EACpB;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC,EAED,CACE,cAAc,EAAE,KAAK,CACtB,EAED,CAC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BAAmB,CACpC;EAED;EACA,CACE,cAAc,EAAE,IAAI,CACrB,EAED,CACE,aAAa,EAAE,KAAK,CACrB,CACF,CAAC,CACH,EAED,CACE,OAAO,EAAE,IAAIA,GAAG,CAAC;EACf;EACA;EACA,CACE,cAAc,EAAE,sBAAsB,CACvC,EAED,CACE,cAAc,EAAE,IAAI,CACrB,EAED,CACE,aAAa,EAAE,KAAK,CACrB,CACF,CAAC,CACH,EAED,CACE,UAAU,EAAE,IAAIA,GAAG,CAAC;EAClB;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC,EAED,CACE,cAAc,EAAE,KAAK,CACtB,EAED,CACE,aAAa,EAAE,KAAK,CACrB,CACF,CAAC,CACH,EACD,CACE,MAAM,EAAE,IAAIA,GAAG,CAAC;EACd;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC,CACF,CAAC,CACH,EAED,CACE,MAAM,EAAE,IAAIA,GAAG,CAAC;EACd;EACA;EACA;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA,CACE,cAAc,EAAE,IAAI,CACrB,EAED,CACE,aAAa,EAAE,KAAK,CACrB,CACF,CAAC,CACH,EAED,CACE,WAAW,EAAE,IAAIA,GAAG,CAAC;EACnB;EACA,CACE,cAAc,EACdD,6BAA6B,GAAG,mBAAmB,GAAG,KAAK,CAC5D;EAED;EACA,CACE,aAAa,EAAEP,SAAS,CACzB,EAED,CACE,aAAa,EAAE,KAAK,CACrB,CACF,CAAC,CACH,EAED,CACE,UAAU,EAAE,IAAIQ,GAAG,CAAC;EAClB;EACA,CACE,cAAc,EAAE,KAAK,CACtB;EACD;EACA,CACE,aAAa,EAAE,KAAK,CACrB,CACF,CAAC,CACH,EAED,CACE,YAAY,EAAE,IAAIA,GAAG,CAAC;EACpB;EACA;EACA,CACE,cAAc,EAAE,IAAI,CACrB,CACF,CAAC,CACH,EAED,CACE,OAAO,EAAE,IAAIA,GAAG,CAAC;EACf;EACA,CACE,cAAc,EAAE,sBAAsB,CACvC;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,IAAIA,GAAG,CAAC;EACf;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC,EAED,CACE,cAAc,EAAE,KAAK,CACtB,EAED,CACE,aAAa,EAAE,KAAK,CACrB,CACF,CAAC,CACH,EAED,CACE,UAAU,EAAE,IAAIA,GAAG,CAAC;EAClB;EACA;EACA;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EAED,CACE,QAAQ,EAAE,IAAIA,GAAG,CAAC;EAChB;EACA;EACA;EACA,CACE,cAAc,EAAET,OAAO,GAAG,mBAAmB,GAAG,MAAM,CACvD;EAED;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EAED,CACE,MAAM,EAAE,IAAIS,GAAG,CAAC;EACd;EACA;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA,CACE,cAAc,EAAE,IAAI,CACrB;EAED;EACA,CACE,oBAAoB,EAAE,IAAI,CAC3B,CACF,CAAC,CACH,EAED,CACE,WAAW,EAAE,IAAIA,GAAG,CAAC;EACnB;EACA,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EACD,CACE,SAAS,EAAE,IAAIA,GAAG,CAAC;EACjB;EACA;EACA,CACE,aAAa,EAAEF,qBAAqB,CACrC,CACF,CAAC,CACH,EAED,CACE,OAAO,EAAE,IAAIE,GAAG,CAAC,CACf,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA;EACA;EACA;EACA,CACE,cAAc,EAAE,IAAI,CACrB;EAED;EACA;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,EAED,CACE,SAAS,EAAE,IAAIA,GAAG,CAAC;EACjB;EACA;EACA,CACE,aAAa,EAAEF,qBAAqB,CACrC,CACF,CAAC,CACH,EAED,CACE,MAAM,EAAE,IAAIE,GAAG,CAAC,CACd,CACE,cAAc,EAAE,mBAAmB,CACpC;EAED;EACA,CACE,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C,CACH,EACD,CACE,OAAO,EAAE,IAAIA,GAAG,CAAC;EACf;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACF,CAAC,CACH,CACF,CAAC;AACJ,CAAC;AAAC,IAAAC,QAAA,GAEaZ,6BAA6B;AAAAa,OAAA,CAAAC,OAAA,GAAAF,QAAA;AAAAG,MAAA,CAAAF,OAAA,GAAAA,OAAA,CAAAC,OAAA"}
@@ -40,11 +40,27 @@ var _default = (0, _iterateJsdoc.default)(({
40
40
  }, jsdocTag);
41
41
  }
42
42
  } else if (startsWithHyphen) {
43
- report(`There must be no hyphen before @${targetTagName} description.`, fixer => {
44
- const [unwantedPart] = /^\s*-\s*/u.exec(desc);
45
- const replacement = sourceCode.getText(jsdocNode).replace(desc, desc.slice(unwantedPart.length));
46
- return fixer.replaceText(jsdocNode, replacement);
47
- }, jsdocTag);
43
+ let lines = 0;
44
+ for (const {
45
+ tokens
46
+ } of jsdocTag.source) {
47
+ if (tokens.description) {
48
+ break;
49
+ }
50
+ lines++;
51
+ }
52
+ utils.reportJSDoc(`There must be no hyphen before @${targetTagName} description.`, {
53
+ line: jsdocTag.source[0].number + lines
54
+ }, () => {
55
+ for (const {
56
+ tokens
57
+ } of jsdocTag.source) {
58
+ if (tokens.description) {
59
+ tokens.description = tokens.description.replace(/^\s*-\s*/u, '');
60
+ break;
61
+ }
62
+ }
63
+ }, true);
48
64
  }
49
65
  };
50
66
  utils.forEachPreferredTag('param', checkHyphens);
@@ -1 +1 @@
1
- {"version":3,"file":"requireHyphenBeforeParamDescription.js","names":["_iterateJsdoc","_interopRequireDefault","require","obj","__esModule","default","_default","iterateJsdoc","sourceCode","utils","report","context","jsdoc","jsdocNode","mainCircumstance","tags","options","checkHyphens","jsdocTag","targetTagName","circumstance","always","desc","getTagDescription","trim","startsWithHyphen","test","fixer","lineIndex","line","sourceLines","getText","split","description","descriptionIndex","lastIndexOf","replacementLine","slice","splice","replacement","join","replaceText","unwantedPart","exec","replace","length","forEachPreferredTag","tagEntries","Object","entries","tagName","preferredParamTag","getPreferredTagName","tag","some","tagNme","iterateAllJsdocs","meta","docs","url","fixable","schema","enum","type","additionalProperties","properties","anyOf","patternProperties","exports","module"],"sources":["../../src/rules/requireHyphenBeforeParamDescription.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n sourceCode,\n utils,\n report,\n context,\n jsdoc,\n jsdocNode,\n}) => {\n const [\n mainCircumstance,\n {\n tags,\n } = {},\n ] = context.options;\n\n const checkHyphens = (jsdocTag, targetTagName, circumstance = mainCircumstance) => {\n const always = !circumstance || circumstance === 'always';\n const desc = utils.getTagDescription(jsdocTag);\n if (!desc.trim()) {\n return;\n }\n\n const startsWithHyphen = (/^\\s*-/u).test(desc);\n if (always) {\n if (!startsWithHyphen) {\n report(`There must be a hyphen before @${targetTagName} description.`, (fixer) => {\n const lineIndex = jsdocTag.line;\n const sourceLines = sourceCode.getText(jsdocNode).split('\\n');\n\n // Get start index of description, accounting for multi-line descriptions\n const description = desc.split('\\n')[0];\n const descriptionIndex = sourceLines[lineIndex].lastIndexOf(description);\n\n const replacementLine = sourceLines[lineIndex]\n .slice(0, descriptionIndex) + '- ' + description;\n sourceLines.splice(lineIndex, 1, replacementLine);\n const replacement = sourceLines.join('\\n');\n\n return fixer.replaceText(jsdocNode, replacement);\n }, jsdocTag);\n }\n } else if (startsWithHyphen) {\n report(`There must be no hyphen before @${targetTagName} description.`, (fixer) => {\n const [\n unwantedPart,\n ] = /^\\s*-\\s*/u.exec(desc);\n\n const replacement = sourceCode\n .getText(jsdocNode)\n .replace(desc, desc.slice(unwantedPart.length));\n\n return fixer.replaceText(jsdocNode, replacement);\n }, jsdocTag);\n }\n };\n\n utils.forEachPreferredTag('param', checkHyphens);\n if (tags) {\n const tagEntries = Object.entries(tags);\n for (const [\n tagName,\n circumstance,\n ] of tagEntries) {\n if (tagName === '*') {\n const preferredParamTag = utils.getPreferredTagName({\n tagName: 'param',\n });\n for (const {\n tag,\n } of jsdoc.tags) {\n if (tag === preferredParamTag || tagEntries.some(([\n tagNme,\n ]) => {\n return tagNme !== '*' && tagNme === tag;\n })) {\n continue;\n }\n\n utils.forEachPreferredTag(tag, (jsdocTag, targetTagName) => {\n checkHyphens(jsdocTag, targetTagName, circumstance);\n });\n }\n\n continue;\n }\n\n utils.forEachPreferredTag(tagName, (jsdocTag, targetTagName) => {\n checkHyphens(jsdocTag, targetTagName, circumstance);\n });\n }\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Requires a hyphen before the `@param` description.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-hyphen-before-param-description',\n },\n fixable: 'code',\n schema: [\n {\n enum: [\n 'always', 'never',\n ],\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n tags: {\n anyOf: [\n {\n patternProperties: {\n '.*': {\n enum: [\n 'always', 'never',\n ],\n type: 'string',\n },\n },\n type: 'object',\n },\n {\n enum: [\n 'any',\n ],\n type: 'string',\n },\n ],\n },\n },\n type: 'object',\n },\n ],\n type: 'layout',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,IAAAG,QAAA,GAE5B,IAAAC,qBAAY,EAAC,CAAC;EAC3BC,UAAU;EACVC,KAAK;EACLC,MAAM;EACNC,OAAO;EACPC,KAAK;EACLC;AACF,CAAC,KAAK;EACJ,MAAM,CACJC,gBAAgB,EAChB;IACEC;EACF,CAAC,GAAG,CAAC,CAAC,CACP,GAAGJ,OAAO,CAACK,OAAO;EAEnB,MAAMC,YAAY,GAAGA,CAACC,QAAQ,EAAEC,aAAa,EAAEC,YAAY,GAAGN,gBAAgB,KAAK;IACjF,MAAMO,MAAM,GAAG,CAACD,YAAY,IAAIA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ACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJzB,WAAW,EAAE,oDAAoD;MACjE0B,GAAG,EAAE;IACP,CAAC;IACDC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,CACN;MACEC,IAAI,EAAE,CACJ,QAAQ,EAAE,OAAO,CAClB;MACDC,IAAI,EAAE;IACR,CAAC,EACD;MACEC,oBAAoB,EAAE,KAAK;MAC3BC,UAAU,EAAE;QACVlD,IAAI,EAAE;UACJmD,KAAK,EAAE,CACL;YACEC,iBAAiB,EAAE;cACjB,IAAI,EAAE;gBACJL,IAAI,EAAE,CACJ,QAAQ,EAAE,OAAO,CAClB;gBACDC,IAAI,EAAE;cACR;YACF,CAAC;YACDA,IAAI,EAAE;UACR,CAAC,EACD;YACED,IAAI,EAAE,CACJ,KAAK,CACN;YACDC,IAAI,EAAE;UACR,CAAC;QAEL;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAK,OAAA,CAAA/D,OAAA,GAAAC,QAAA;AAAA+D,MAAA,CAAAD,OAAA,GAAAA,OAAA,CAAA/D,OAAA"}
1
+ {"version":3,"file":"requireHyphenBeforeParamDescription.js","names":["_iterateJsdoc","_interopRequireDefault","require","obj","__esModule","default","_default","iterateJsdoc","sourceCode","utils","report","context","jsdoc","jsdocNode","mainCircumstance","tags","options","checkHyphens","jsdocTag","targetTagName","circumstance","always","desc","getTagDescription","trim","startsWithHyphen","test","fixer","lineIndex","line","sourceLines","getText","split","description","descriptionIndex","lastIndexOf","replacementLine","slice","splice","replacement","join","replaceText","lines","tokens","source","reportJSDoc","number","replace","forEachPreferredTag","tagEntries","Object","entries","tagName","preferredParamTag","getPreferredTagName","tag","some","tagNme","iterateAllJsdocs","meta","docs","url","fixable","schema","enum","type","additionalProperties","properties","anyOf","patternProperties","exports","module"],"sources":["../../src/rules/requireHyphenBeforeParamDescription.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n sourceCode,\n utils,\n report,\n context,\n jsdoc,\n jsdocNode,\n}) => {\n const [\n mainCircumstance,\n {\n tags,\n } = {},\n ] = context.options;\n\n const checkHyphens = (jsdocTag, targetTagName, circumstance = mainCircumstance) => {\n const always = !circumstance || circumstance === 'always';\n const desc = utils.getTagDescription(jsdocTag);\n if (!desc.trim()) {\n return;\n }\n\n const startsWithHyphen = (/^\\s*-/u).test(desc);\n if (always) {\n if (!startsWithHyphen) {\n report(`There must be a hyphen before @${targetTagName} description.`, (fixer) => {\n const lineIndex = jsdocTag.line;\n const sourceLines = sourceCode.getText(jsdocNode).split('\\n');\n\n // Get start index of description, accounting for multi-line descriptions\n const description = desc.split('\\n')[0];\n const descriptionIndex = sourceLines[lineIndex].lastIndexOf(description);\n\n const replacementLine = sourceLines[lineIndex]\n .slice(0, descriptionIndex) + '- ' + description;\n sourceLines.splice(lineIndex, 1, replacementLine);\n const replacement = sourceLines.join('\\n');\n\n return fixer.replaceText(jsdocNode, replacement);\n }, jsdocTag);\n }\n } else if (startsWithHyphen) {\n let lines = 0;\n for (const {\n tokens,\n } of jsdocTag.source) {\n if (tokens.description) {\n break;\n }\n\n lines++;\n }\n\n utils.reportJSDoc(\n `There must be no hyphen before @${targetTagName} description.`,\n {\n line: jsdocTag.source[0].number + lines,\n },\n () => {\n for (const {\n tokens,\n } of jsdocTag.source) {\n if (tokens.description) {\n tokens.description = tokens.description.replace(\n /^\\s*-\\s*/u, '',\n );\n break;\n }\n }\n },\n true,\n );\n }\n };\n\n utils.forEachPreferredTag('param', checkHyphens);\n if (tags) {\n const tagEntries = Object.entries(tags);\n for (const [\n tagName,\n circumstance,\n ] of tagEntries) {\n if (tagName === '*') {\n const preferredParamTag = utils.getPreferredTagName({\n tagName: 'param',\n });\n for (const {\n tag,\n } of jsdoc.tags) {\n if (tag === preferredParamTag || tagEntries.some(([\n tagNme,\n ]) => {\n return tagNme !== '*' && tagNme === tag;\n })) {\n continue;\n }\n\n utils.forEachPreferredTag(tag, (jsdocTag, targetTagName) => {\n checkHyphens(jsdocTag, targetTagName, circumstance);\n });\n }\n\n continue;\n }\n\n utils.forEachPreferredTag(tagName, (jsdocTag, targetTagName) => {\n checkHyphens(jsdocTag, targetTagName, circumstance);\n });\n }\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Requires a hyphen before the `@param` description.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-hyphen-before-param-description',\n },\n fixable: 'code',\n schema: [\n {\n enum: [\n 'always', 'never',\n ],\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n tags: {\n anyOf: [\n {\n patternProperties: {\n '.*': {\n enum: [\n 'always', 'never',\n ],\n type: 'string',\n },\n },\n type: 'object',\n },\n {\n enum: [\n 'any',\n ],\n type: 'string',\n },\n ],\n },\n },\n type: 'object',\n },\n ],\n type: 'layout',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,IAAAG,QAAA,GAE5B,IAAAC,qBAAY,EAAC,CAAC;EAC3BC,UAAU;EACVC,KAAK;EACLC,MAAM;EACNC,OAAO;EACPC,KAAK;EACLC;AACF,CAAC,KAAK;EACJ,MAAM,CACJC,gBAAgB,EAChB;IACEC;EACF,CAAC,GAAG,CAAC,CAAC,CACP,GAAGJ,OAAO,CAACK,OAAO;EAEnB,MAAMC,YAAY,GAAGA,CAACC,QAAQ,EAAEC,aAAa,EAAEC,YAAY,GAAGN,gBAAgB,KAAK;IACjF,MAAMO,MAAM,GAAG,CAACD,YAAY,IAAIA,YAAY,KAAK,QAAQ;IACzD,MAAME,IAAI,GAAGb,KAAK,CAACc,iBAAiB,CAACL,QAAQ,CAAC;IAC9C,IAAI,CA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Y,CAAC;MACrD,CAAC,CAAC;IACJ;EACF;AACF,CAAC,EAAE;EACDsC,gBAAgB,EAAE,IAAI;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJ3B,WAAW,EAAE,oDAAoD;MACjE4B,GAAG,EAAE;IACP,CAAC;IACDC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,CACN;MACEC,IAAI,EAAE,CACJ,QAAQ,EAAE,OAAO,CAClB;MACDC,IAAI,EAAE;IACR,CAAC,EACD;MACEC,oBAAoB,EAAE,KAAK;MAC3BC,UAAU,EAAE;QACVpD,IAAI,EAAE;UACJqD,KAAK,EAAE,CACL;YACEC,iBAAiB,EAAE;cACjB,IAAI,EAAE;gBACJL,IAAI,EAAE,CACJ,QAAQ,EAAE,OAAO,CAClB;gBACDC,IAAI,EAAE;cACR;YACF,CAAC;YACDA,IAAI,EAAE;UACR,CAAC,EACD;YACED,IAAI,EAAE,CACJ,KAAK,CACN;YACDC,IAAI,EAAE;UACR,CAAC;QAEL;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAK,OAAA,CAAAjE,OAAA,GAAAC,QAAA;AAAAiE,MAAA,CAAAD,OAAA,GAAAA,OAAA,CAAAjE,OAAA"}
@@ -170,6 +170,29 @@ function quux () {
170
170
  }
171
171
  // "jsdoc/require-hyphen-before-param-description": ["error"|"warn", "always",{"tags":{"returns":"never"}}]
172
172
  // Message: There must be a hyphen before @param description.
173
+
174
+ /**
175
+ * Split a unit to metric prefix and basic unit.
176
+ *
177
+ * @param {string} unit - Unit to split.
178
+ * @param {string} [basicUnit] - Basic unit regardless of the metric prefix.
179
+ * If omitted, basic unit will be inferred by trying to remove the metric
180
+ * prefix in `unit`.
181
+ *
182
+ * @returns {{ prefix: string, basicUnit: string }} - Split result.
183
+ * If `unit` does not have a metric prefix, `''` is returned for `prefix`.
184
+ * If `unit` does not have a basic unit, `''` is returned for `basicUnit`.
185
+ */
186
+ // "jsdoc/require-hyphen-before-param-description": ["error"|"warn", "always",{"tags":{"*":"never","property":"always"}}]
187
+ // Message: There must be no hyphen before @returns description.
188
+
189
+ /**
190
+ * @returns {{
191
+ * prefix: string, basicUnit: string
192
+ * }} - Split result.
193
+ */
194
+ // "jsdoc/require-hyphen-before-param-description": ["error"|"warn", "always",{"tags":{"*":"never","property":"always"}}]
195
+ // Message: There must be no hyphen before @returns description.
173
196
  ````
174
197
 
175
198
 
package/package.json CHANGED
@@ -38,7 +38,7 @@
38
38
  "chai": "^4.3.7",
39
39
  "cross-env": "^7.0.3",
40
40
  "decamelize": "^5.0.1",
41
- "eslint": "^8.39.0",
41
+ "eslint": "8.39.0",
42
42
  "eslint-config-canonical": "~33.0.1",
43
43
  "gitdown": "^3.1.5",
44
44
  "glob": "^10.2.2",
@@ -124,5 +124,5 @@
124
124
  "test-cov": "cross-env TIMING=1 nyc --reporter text npm run test-no-cov",
125
125
  "test-index": "npm run test-no-cov -- test/rules/index.js"
126
126
  },
127
- "version": "44.2.0"
127
+ "version": "44.2.2"
128
128
  }