Skip to content

Commit f9064db

Browse files
committed
- Document new valid-types behavior
1 parent 2c24ea9 commit f9064db

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.README/rules/valid-types.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
Requires all types to be valid JSDoc or Closure compiler types without syntax errors.
44

5+
Also impacts behaviors on namepath-pointing or event-pointing tags:
6+
7+
1. `@alias`, `@augments`, `@extends`, `@lends`, `@memberof`, `@memberof!`, `@mixes`, `@name`, `@this`
8+
1. `@callback`, `@event`, `@listens`, `@fires`, `@emits`
9+
1. `@borrows`
10+
11+
The following apply to the above sets:
12+
13+
- Expect tags in set 1 or 2 to have a valid namepath if present
14+
- Prevent set 2 from being empty by setting `allowEmptyNamepaths` to `false` as these tags might have some indicative value without a path (but set 1 will always fail if empty)
15+
- For the special case of set 3, i.e., `@borrows <that namepath> as <this namepath>`, check that both namepaths are present and valid and ensure there is an `as ` between them.
16+
517
|||
618
|---|---|
719
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|

0 commit comments

Comments
 (0)