Skip to content

Commit ab01baa

Browse files
committed
docs: reference namepath-or-url-referencing
Also: - test: add case for `namepath-or-url-referencing`
1 parent cc67c17 commit ab01baa

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

.README/settings.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ values are objects with the following optional properties:
300300
checked to ensure it is a valid namepath. You might use this to ensure
301301
that tags which normally allow free text, e.g., `@see` will instead
302302
require a namepath.
303+
- `"namepath-or-url-referencing"` - For inline tags which may point to
304+
a namepath or URL.
303305
- `false` - This will disallow any text in the name position.
304306
- `type`:
305307
- `true` - Allows valid types within brackets. This is the default.

docs/rules/no-undefined-types.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,12 @@ const a = new Todo();
301301
* a link that is {@link NotKnown}
302302
*/
303303
// Message: The type 'NotKnown' is undefined.
304+
305+
/**
306+
* This is a {@namepathOrURLReferencer SomeType}.
307+
*/
308+
// Settings: {"jsdoc":{"structuredTags":{"namepathOrURLReferencer":{"name":"namepath-or-url-referencing"}}}}
309+
// Message: The type 'SomeType' is undefined.
304310
````
305311

306312

docs/settings.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@ values are objects with the following optional properties:
327327
checked to ensure it is a valid namepath. You might use this to ensure
328328
that tags which normally allow free text, e.g., `@see` will instead
329329
require a namepath.
330+
- `"namepath-or-url-referencing"` - For inline tags which may point to
331+
a namepath or URL.
330332
- `false` - This will disallow any text in the name position.
331333
- `type`:
332334
- `true` - Allows valid types within brackets. This is the default.

test/rules/assertions/noUndefinedTypes.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,28 @@ export default {
532532
},
533533
],
534534
},
535+
{
536+
code: `
537+
/**
538+
* This is a {@namepathOrURLReferencer SomeType}.
539+
*/
540+
`,
541+
errors: [
542+
{
543+
line: 3,
544+
message: 'The type \'SomeType\' is undefined.',
545+
},
546+
],
547+
settings: {
548+
jsdoc: {
549+
structuredTags: {
550+
namepathOrURLReferencer: {
551+
name: 'namepath-or-url-referencing',
552+
},
553+
},
554+
},
555+
},
556+
},
535557
],
536558
valid: [
537559
{

0 commit comments

Comments
 (0)