Skip to content

Commit c1781d2

Browse files
authored
feat(no-undefined-types): check inline and namepath-referencing tags (#1062)
1 parent 3bcee32 commit c1781d2

File tree

6 files changed

+236
-77
lines changed

6 files changed

+236
-77
lines changed

docs/rules/no-undefined-types.md

+26-10
Original file line numberDiff line numberDiff line change
@@ -247,20 +247,12 @@ function quux () {}
247247
// Message: The type 'SomeType' is undefined.
248248

249249
/**
250-
* @namepathDefiner SomeType
251-
*/
252-
/**
253-
* @type {SomeType}
254-
*/
255-
// Settings: {"jsdoc":{"structuredTags":{"namepathDefiner":{"name":"namepath-referencing"}}}}
256-
// Message: The type 'SomeType' is undefined.
257-
258-
/**
259-
* @namepathDefiner SomeType
250+
* @namepathReferencing SomeType
260251
*/
261252
/**
262253
* @type {SomeType}
263254
*/
255+
// Settings: {"jsdoc":{"structuredTags":{"namepathReferencing":{"name":"namepath-referencing"}}}}
264256
// Message: The type 'SomeType' is undefined.
265257

266258
/**
@@ -745,5 +737,29 @@ function quux(foo, bar) {
745737

746738
}
747739
// "jsdoc/no-undefined-types": ["error"|"warn", {"disableReporting":true}]
740+
741+
class MyClass {}
742+
class AnotherClass {}
743+
744+
/**
745+
* A description mentioning {@link MyClass} and {@link AnotherClass | another class} and a URL via [this link]{@link https://www.example.com}.
746+
*/
747+
function quux(foo) {
748+
console.log(foo);
749+
}
750+
751+
quux(0);
752+
753+
class MyClass {}
754+
class AnotherClass {}
755+
756+
/**
757+
* @see A tag mentioning {@link MyClass} and {@link AnotherClass | another class} and a URL via [this link]{@link https://www.example.com}.
758+
*/
759+
function quux(foo) {
760+
console.log(foo);
761+
}
762+
763+
quux(0);
748764
````
749765

0 commit comments

Comments
 (0)