eslint-plugin-tsdoc-require-2 1.0.2 → 1.0.3
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 +115 -73
- package/dist/internal/require-tag-factory.cjs +309 -0
- package/dist/internal/require-tag-factory.d.ts +26 -0
- package/dist/internal/require-tag-factory.d.ts.map +1 -0
- package/dist/internal/require-tag-factory.js +302 -0
- package/dist/internal/require-tag-factory.js.map +1 -0
- package/dist/plugin.cjs +33 -11
- package/dist/plugin.d.ts +2 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +33 -11
- package/dist/plugin.js.map +1 -1
- package/dist/rules/require-tag-rules.cjs +88 -0
- package/dist/rules/require-tag-rules.d.ts +35 -0
- package/dist/rules/require-tag-rules.d.ts.map +1 -0
- package/dist/rules/require-tag-rules.js +85 -0
- package/dist/rules/require-tag-rules.js.map +1 -0
- package/dist/rules/require.cjs +16 -3
- package/dist/rules/require.d.ts +1 -0
- package/dist/rules/require.d.ts.map +1 -1
- package/dist/rules/require.js +16 -3
- package/dist/rules/require.js.map +1 -1
- package/dist/rules/required-tags/require-alpha.cjs +32 -0
- package/dist/rules/required-tags/require-alpha.d.ts +4 -0
- package/dist/rules/required-tags/require-alpha.d.ts.map +1 -0
- package/dist/rules/required-tags/require-alpha.js +30 -0
- package/dist/rules/required-tags/require-alpha.js.map +1 -0
- package/dist/rules/required-tags/require-beta.cjs +32 -0
- package/dist/rules/required-tags/require-beta.d.ts +4 -0
- package/dist/rules/required-tags/require-beta.d.ts.map +1 -0
- package/dist/rules/required-tags/require-beta.js +30 -0
- package/dist/rules/required-tags/require-beta.js.map +1 -0
- package/dist/rules/required-tags/require-decorator.cjs +32 -0
- package/dist/rules/required-tags/require-decorator.d.ts +4 -0
- package/dist/rules/required-tags/require-decorator.d.ts.map +1 -0
- package/dist/rules/required-tags/require-decorator.js +30 -0
- package/dist/rules/required-tags/require-decorator.js.map +1 -0
- package/dist/rules/required-tags/require-default-value.cjs +32 -0
- package/dist/rules/required-tags/require-default-value.d.ts +4 -0
- package/dist/rules/required-tags/require-default-value.d.ts.map +1 -0
- package/dist/rules/required-tags/require-default-value.js +30 -0
- package/dist/rules/required-tags/require-default-value.js.map +1 -0
- package/dist/rules/required-tags/require-deprecated.cjs +32 -0
- package/dist/rules/required-tags/require-deprecated.d.ts +4 -0
- package/dist/rules/required-tags/require-deprecated.d.ts.map +1 -0
- package/dist/rules/required-tags/require-deprecated.js +30 -0
- package/dist/rules/required-tags/require-deprecated.js.map +1 -0
- package/dist/rules/required-tags/require-event-property.cjs +32 -0
- package/dist/rules/required-tags/require-event-property.d.ts +4 -0
- package/dist/rules/required-tags/require-event-property.d.ts.map +1 -0
- package/dist/rules/required-tags/require-event-property.js +30 -0
- package/dist/rules/required-tags/require-event-property.js.map +1 -0
- package/dist/rules/required-tags/require-example.cjs +32 -0
- package/dist/rules/required-tags/require-example.d.ts +4 -0
- package/dist/rules/required-tags/require-example.d.ts.map +1 -0
- package/dist/rules/required-tags/require-example.js +30 -0
- package/dist/rules/required-tags/require-example.js.map +1 -0
- package/dist/rules/required-tags/require-experimental.cjs +32 -0
- package/dist/rules/required-tags/require-experimental.d.ts +4 -0
- package/dist/rules/required-tags/require-experimental.d.ts.map +1 -0
- package/dist/rules/required-tags/require-experimental.js +30 -0
- package/dist/rules/required-tags/require-experimental.js.map +1 -0
- package/dist/rules/required-tags/require-inherit-doc.cjs +32 -0
- package/dist/rules/required-tags/require-inherit-doc.d.ts +4 -0
- package/dist/rules/required-tags/require-inherit-doc.d.ts.map +1 -0
- package/dist/rules/required-tags/require-inherit-doc.js +30 -0
- package/dist/rules/required-tags/require-inherit-doc.js.map +1 -0
- package/dist/rules/required-tags/require-internal.cjs +32 -0
- package/dist/rules/required-tags/require-internal.d.ts +4 -0
- package/dist/rules/required-tags/require-internal.d.ts.map +1 -0
- package/dist/rules/required-tags/require-internal.js +30 -0
- package/dist/rules/required-tags/require-internal.js.map +1 -0
- package/dist/rules/required-tags/require-label.cjs +32 -0
- package/dist/rules/required-tags/require-label.d.ts +4 -0
- package/dist/rules/required-tags/require-label.d.ts.map +1 -0
- package/dist/rules/required-tags/require-label.js +30 -0
- package/dist/rules/required-tags/require-label.js.map +1 -0
- package/dist/rules/required-tags/require-link.cjs +32 -0
- package/dist/rules/required-tags/require-link.d.ts +4 -0
- package/dist/rules/required-tags/require-link.d.ts.map +1 -0
- package/dist/rules/required-tags/require-link.js +30 -0
- package/dist/rules/required-tags/require-link.js.map +1 -0
- package/dist/rules/required-tags/require-override.cjs +32 -0
- package/dist/rules/required-tags/require-override.d.ts +4 -0
- package/dist/rules/required-tags/require-override.d.ts.map +1 -0
- package/dist/rules/required-tags/require-override.js +30 -0
- package/dist/rules/required-tags/require-override.js.map +1 -0
- package/dist/rules/required-tags/require-package-documentation.cjs +32 -0
- package/dist/rules/required-tags/require-package-documentation.d.ts +4 -0
- package/dist/rules/required-tags/require-package-documentation.d.ts.map +1 -0
- package/dist/rules/required-tags/require-package-documentation.js +30 -0
- package/dist/rules/required-tags/require-package-documentation.js.map +1 -0
- package/dist/rules/required-tags/require-param.cjs +32 -0
- package/dist/rules/required-tags/require-param.d.ts +4 -0
- package/dist/rules/required-tags/require-param.d.ts.map +1 -0
- package/dist/rules/required-tags/require-param.js +30 -0
- package/dist/rules/required-tags/require-param.js.map +1 -0
- package/dist/rules/required-tags/require-private-remarks.cjs +32 -0
- package/dist/rules/required-tags/require-private-remarks.d.ts +4 -0
- package/dist/rules/required-tags/require-private-remarks.d.ts.map +1 -0
- package/dist/rules/required-tags/require-private-remarks.js +30 -0
- package/dist/rules/required-tags/require-private-remarks.js.map +1 -0
- package/dist/rules/required-tags/require-public.cjs +32 -0
- package/dist/rules/required-tags/require-public.d.ts +4 -0
- package/dist/rules/required-tags/require-public.d.ts.map +1 -0
- package/dist/rules/required-tags/require-public.js +30 -0
- package/dist/rules/required-tags/require-public.js.map +1 -0
- package/dist/rules/required-tags/require-readonly.cjs +32 -0
- package/dist/rules/required-tags/require-readonly.d.ts +4 -0
- package/dist/rules/required-tags/require-readonly.d.ts.map +1 -0
- package/dist/rules/required-tags/require-readonly.js +30 -0
- package/dist/rules/required-tags/require-readonly.js.map +1 -0
- package/dist/rules/required-tags/require-remarks.cjs +32 -0
- package/dist/rules/required-tags/require-remarks.d.ts +4 -0
- package/dist/rules/required-tags/require-remarks.d.ts.map +1 -0
- package/dist/rules/required-tags/require-remarks.js +30 -0
- package/dist/rules/required-tags/require-remarks.js.map +1 -0
- package/dist/rules/required-tags/require-returns.cjs +32 -0
- package/dist/rules/required-tags/require-returns.d.ts +4 -0
- package/dist/rules/required-tags/require-returns.d.ts.map +1 -0
- package/dist/rules/required-tags/require-returns.js +30 -0
- package/dist/rules/required-tags/require-returns.js.map +1 -0
- package/dist/rules/required-tags/require-sealed.cjs +32 -0
- package/dist/rules/required-tags/require-sealed.d.ts +4 -0
- package/dist/rules/required-tags/require-sealed.d.ts.map +1 -0
- package/dist/rules/required-tags/require-sealed.js +30 -0
- package/dist/rules/required-tags/require-sealed.js.map +1 -0
- package/dist/rules/required-tags/require-see.cjs +32 -0
- package/dist/rules/required-tags/require-see.d.ts +4 -0
- package/dist/rules/required-tags/require-see.d.ts.map +1 -0
- package/dist/rules/required-tags/require-see.js +30 -0
- package/dist/rules/required-tags/require-see.js.map +1 -0
- package/dist/rules/required-tags/require-throws.cjs +32 -0
- package/dist/rules/required-tags/require-throws.d.ts +4 -0
- package/dist/rules/required-tags/require-throws.d.ts.map +1 -0
- package/dist/rules/required-tags/require-throws.js +30 -0
- package/dist/rules/required-tags/require-throws.js.map +1 -0
- package/dist/rules/required-tags/require-type-param.cjs +32 -0
- package/dist/rules/required-tags/require-type-param.d.ts +4 -0
- package/dist/rules/required-tags/require-type-param.d.ts.map +1 -0
- package/dist/rules/required-tags/require-type-param.js +30 -0
- package/dist/rules/required-tags/require-type-param.js.map +1 -0
- package/dist/rules/required-tags/require-virtual.cjs +32 -0
- package/dist/rules/required-tags/require-virtual.d.ts +4 -0
- package/dist/rules/required-tags/require-virtual.d.ts.map +1 -0
- package/dist/rules/required-tags/require-virtual.js +30 -0
- package/dist/rules/required-tags/require-virtual.js.map +1 -0
- package/docs/rules/require.md +39 -5
- package/docs/rules/required-tags/require-alpha.md +57 -0
- package/docs/rules/required-tags/require-beta.md +57 -0
- package/docs/rules/required-tags/require-decorator.md +57 -0
- package/docs/rules/required-tags/require-default-value.md +57 -0
- package/docs/rules/required-tags/require-deprecated.md +57 -0
- package/docs/rules/required-tags/require-event-property.md +57 -0
- package/docs/rules/required-tags/require-example.md +57 -0
- package/docs/rules/required-tags/require-experimental.md +57 -0
- package/docs/rules/required-tags/require-inherit-doc.md +57 -0
- package/docs/rules/required-tags/require-internal.md +57 -0
- package/docs/rules/required-tags/require-label.md +57 -0
- package/docs/rules/required-tags/require-link.md +57 -0
- package/docs/rules/required-tags/require-override.md +57 -0
- package/docs/rules/required-tags/require-package-documentation.md +57 -0
- package/docs/rules/required-tags/require-param.md +57 -0
- package/docs/rules/required-tags/require-private-remarks.md +57 -0
- package/docs/rules/required-tags/require-public.md +57 -0
- package/docs/rules/required-tags/require-readonly.md +57 -0
- package/docs/rules/required-tags/require-remarks.md +57 -0
- package/docs/rules/required-tags/require-returns.md +57 -0
- package/docs/rules/required-tags/require-sealed.md +57 -0
- package/docs/rules/required-tags/require-see.md +57 -0
- package/docs/rules/required-tags/require-throws.md +57 -0
- package/docs/rules/required-tags/require-type-param.md +57 -0
- package/docs/rules/required-tags/require-virtual.md +57 -0
- package/docs/rules/required-tags.md +76 -0
- package/package.json +23 -11
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# tsdoc-require-2/require-deprecated
|
|
2
|
+
|
|
3
|
+
Require the `@deprecated` tag in TSDoc blocks for exported declarations.
|
|
4
|
+
|
|
5
|
+
## Rule details
|
|
6
|
+
|
|
7
|
+
By default, this rule reports exported declarations (and supported default exports) that have TSDoc but are missing `@deprecated`. Set `includeNonExported: true` to also check non-exported top-level declarations.
|
|
8
|
+
|
|
9
|
+
It supports the same options as [`tsdoc-require-2/require`](../require.md):
|
|
10
|
+
|
|
11
|
+
- `enforceFor`: choose which declaration kinds are checked.
|
|
12
|
+
- `includeNonExported`: when `true`, also check non-exported top-level declarations (default: `false`).
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"rules": {
|
|
19
|
+
"tsdoc-require-2/require-deprecated": [
|
|
20
|
+
"error",
|
|
21
|
+
{
|
|
22
|
+
"enforceFor": ["class", "function", "interface", "type", "enum", "variable", "object"]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
### ❌ Incorrect
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
/**
|
|
35
|
+
* Performs a task.
|
|
36
|
+
*/
|
|
37
|
+
export function runTask(value: string): string {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### ✅ Correct
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
/**
|
|
46
|
+
* Performs a task.
|
|
47
|
+
* @deprecated
|
|
48
|
+
*/
|
|
49
|
+
export function runTask(value: string): string {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Further reading
|
|
55
|
+
|
|
56
|
+
- TSDoc tag reference: <https://tsdoc.org/pages/tags/deprecated/>
|
|
57
|
+
- Rule index: [required-tags](../required-tags.md)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# tsdoc-require-2/require-event-property
|
|
2
|
+
|
|
3
|
+
Require the `@eventProperty` tag in TSDoc blocks for exported declarations.
|
|
4
|
+
|
|
5
|
+
## Rule details
|
|
6
|
+
|
|
7
|
+
By default, this rule reports exported declarations (and supported default exports) that have TSDoc but are missing `@eventProperty`. Set `includeNonExported: true` to also check non-exported top-level declarations.
|
|
8
|
+
|
|
9
|
+
It supports the same options as [`tsdoc-require-2/require`](../require.md):
|
|
10
|
+
|
|
11
|
+
- `enforceFor`: choose which declaration kinds are checked.
|
|
12
|
+
- `includeNonExported`: when `true`, also check non-exported top-level declarations (default: `false`).
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"rules": {
|
|
19
|
+
"tsdoc-require-2/require-event-property": [
|
|
20
|
+
"error",
|
|
21
|
+
{
|
|
22
|
+
"enforceFor": ["class", "function", "interface", "type", "enum", "variable", "object"]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
### ❌ Incorrect
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
/**
|
|
35
|
+
* Performs a task.
|
|
36
|
+
*/
|
|
37
|
+
export function runTask(value: string): string {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### ✅ Correct
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
/**
|
|
46
|
+
* Performs a task.
|
|
47
|
+
* @eventProperty
|
|
48
|
+
*/
|
|
49
|
+
export function runTask(value: string): string {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Further reading
|
|
55
|
+
|
|
56
|
+
- TSDoc tag reference: <https://tsdoc.org/pages/tags/eventproperty/>
|
|
57
|
+
- Rule index: [required-tags](../required-tags.md)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# tsdoc-require-2/require-example
|
|
2
|
+
|
|
3
|
+
Require the `@example` tag in TSDoc blocks for exported declarations.
|
|
4
|
+
|
|
5
|
+
## Rule details
|
|
6
|
+
|
|
7
|
+
By default, this rule reports exported declarations (and supported default exports) that have TSDoc but are missing `@example`. Set `includeNonExported: true` to also check non-exported top-level declarations.
|
|
8
|
+
|
|
9
|
+
It supports the same options as [`tsdoc-require-2/require`](../require.md):
|
|
10
|
+
|
|
11
|
+
- `enforceFor`: choose which declaration kinds are checked.
|
|
12
|
+
- `includeNonExported`: when `true`, also check non-exported top-level declarations (default: `false`).
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"rules": {
|
|
19
|
+
"tsdoc-require-2/require-example": [
|
|
20
|
+
"error",
|
|
21
|
+
{
|
|
22
|
+
"enforceFor": ["class", "function", "interface", "type", "enum", "variable", "object"]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
### ❌ Incorrect
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
/**
|
|
35
|
+
* Performs a task.
|
|
36
|
+
*/
|
|
37
|
+
export function runTask(value: string): string {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### ✅ Correct
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
/**
|
|
46
|
+
* Performs a task.
|
|
47
|
+
* @example
|
|
48
|
+
*/
|
|
49
|
+
export function runTask(value: string): string {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Further reading
|
|
55
|
+
|
|
56
|
+
- TSDoc tag reference: <https://tsdoc.org/pages/tags/example/>
|
|
57
|
+
- Rule index: [required-tags](../required-tags.md)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# tsdoc-require-2/require-experimental
|
|
2
|
+
|
|
3
|
+
Require the `@experimental` tag in TSDoc blocks for exported declarations.
|
|
4
|
+
|
|
5
|
+
## Rule details
|
|
6
|
+
|
|
7
|
+
By default, this rule reports exported declarations (and supported default exports) that have TSDoc but are missing `@experimental`. Set `includeNonExported: true` to also check non-exported top-level declarations.
|
|
8
|
+
|
|
9
|
+
It supports the same options as [`tsdoc-require-2/require`](../require.md):
|
|
10
|
+
|
|
11
|
+
- `enforceFor`: choose which declaration kinds are checked.
|
|
12
|
+
- `includeNonExported`: when `true`, also check non-exported top-level declarations (default: `false`).
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"rules": {
|
|
19
|
+
"tsdoc-require-2/require-experimental": [
|
|
20
|
+
"error",
|
|
21
|
+
{
|
|
22
|
+
"enforceFor": ["class", "function", "interface", "type", "enum", "variable", "object"]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
### ❌ Incorrect
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
/**
|
|
35
|
+
* Performs a task.
|
|
36
|
+
*/
|
|
37
|
+
export function runTask(value: string): string {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### ✅ Correct
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
/**
|
|
46
|
+
* Performs a task.
|
|
47
|
+
* @experimental
|
|
48
|
+
*/
|
|
49
|
+
export function runTask(value: string): string {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Further reading
|
|
55
|
+
|
|
56
|
+
- TSDoc tag reference: <https://tsdoc.org/pages/tags/experimental/>
|
|
57
|
+
- Rule index: [required-tags](../required-tags.md)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# tsdoc-require-2/require-inherit-doc
|
|
2
|
+
|
|
3
|
+
Require the `@inheritDoc` tag in TSDoc blocks for exported declarations.
|
|
4
|
+
|
|
5
|
+
## Rule details
|
|
6
|
+
|
|
7
|
+
By default, this rule reports exported declarations (and supported default exports) that have TSDoc but are missing `@inheritDoc`. Set `includeNonExported: true` to also check non-exported top-level declarations.
|
|
8
|
+
|
|
9
|
+
It supports the same options as [`tsdoc-require-2/require`](../require.md):
|
|
10
|
+
|
|
11
|
+
- `enforceFor`: choose which declaration kinds are checked.
|
|
12
|
+
- `includeNonExported`: when `true`, also check non-exported top-level declarations (default: `false`).
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"rules": {
|
|
19
|
+
"tsdoc-require-2/require-inherit-doc": [
|
|
20
|
+
"error",
|
|
21
|
+
{
|
|
22
|
+
"enforceFor": ["class", "function", "interface", "type", "enum", "variable", "object"]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
### ❌ Incorrect
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
/**
|
|
35
|
+
* Performs a task.
|
|
36
|
+
*/
|
|
37
|
+
export function runTask(value: string): string {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### ✅ Correct
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
/**
|
|
46
|
+
* Performs a task.
|
|
47
|
+
* @inheritDoc
|
|
48
|
+
*/
|
|
49
|
+
export function runTask(value: string): string {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Further reading
|
|
55
|
+
|
|
56
|
+
- TSDoc tag reference: <https://tsdoc.org/pages/tags/inheritdoc/>
|
|
57
|
+
- Rule index: [required-tags](../required-tags.md)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# tsdoc-require-2/require-internal
|
|
2
|
+
|
|
3
|
+
Require the `@internal` tag in TSDoc blocks for exported declarations.
|
|
4
|
+
|
|
5
|
+
## Rule details
|
|
6
|
+
|
|
7
|
+
By default, this rule reports exported declarations (and supported default exports) that have TSDoc but are missing `@internal`. Set `includeNonExported: true` to also check non-exported top-level declarations.
|
|
8
|
+
|
|
9
|
+
It supports the same options as [`tsdoc-require-2/require`](../require.md):
|
|
10
|
+
|
|
11
|
+
- `enforceFor`: choose which declaration kinds are checked.
|
|
12
|
+
- `includeNonExported`: when `true`, also check non-exported top-level declarations (default: `false`).
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"rules": {
|
|
19
|
+
"tsdoc-require-2/require-internal": [
|
|
20
|
+
"error",
|
|
21
|
+
{
|
|
22
|
+
"enforceFor": ["class", "function", "interface", "type", "enum", "variable", "object"]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
### ❌ Incorrect
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
/**
|
|
35
|
+
* Performs a task.
|
|
36
|
+
*/
|
|
37
|
+
export function runTask(value: string): string {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### ✅ Correct
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
/**
|
|
46
|
+
* Performs a task.
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
export function runTask(value: string): string {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Further reading
|
|
55
|
+
|
|
56
|
+
- TSDoc tag reference: <https://tsdoc.org/pages/tags/internal/>
|
|
57
|
+
- Rule index: [required-tags](../required-tags.md)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# tsdoc-require-2/require-label
|
|
2
|
+
|
|
3
|
+
Require the `@label` tag in TSDoc blocks for exported declarations.
|
|
4
|
+
|
|
5
|
+
## Rule details
|
|
6
|
+
|
|
7
|
+
By default, this rule reports exported declarations (and supported default exports) that have TSDoc but are missing `@label`. Set `includeNonExported: true` to also check non-exported top-level declarations.
|
|
8
|
+
|
|
9
|
+
It supports the same options as [`tsdoc-require-2/require`](../require.md):
|
|
10
|
+
|
|
11
|
+
- `enforceFor`: choose which declaration kinds are checked.
|
|
12
|
+
- `includeNonExported`: when `true`, also check non-exported top-level declarations (default: `false`).
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"rules": {
|
|
19
|
+
"tsdoc-require-2/require-label": [
|
|
20
|
+
"error",
|
|
21
|
+
{
|
|
22
|
+
"enforceFor": ["class", "function", "interface", "type", "enum", "variable", "object"]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
### ❌ Incorrect
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
/**
|
|
35
|
+
* Performs a task.
|
|
36
|
+
*/
|
|
37
|
+
export function runTask(value: string): string {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### ✅ Correct
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
/**
|
|
46
|
+
* Performs a task.
|
|
47
|
+
* @label
|
|
48
|
+
*/
|
|
49
|
+
export function runTask(value: string): string {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Further reading
|
|
55
|
+
|
|
56
|
+
- TSDoc tag reference: <https://tsdoc.org/pages/tags/label/>
|
|
57
|
+
- Rule index: [required-tags](../required-tags.md)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# tsdoc-require-2/require-link
|
|
2
|
+
|
|
3
|
+
Require the `@link` tag in TSDoc blocks for exported declarations.
|
|
4
|
+
|
|
5
|
+
## Rule details
|
|
6
|
+
|
|
7
|
+
By default, this rule reports exported declarations (and supported default exports) that have TSDoc but are missing `@link`. Set `includeNonExported: true` to also check non-exported top-level declarations.
|
|
8
|
+
|
|
9
|
+
It supports the same options as [`tsdoc-require-2/require`](../require.md):
|
|
10
|
+
|
|
11
|
+
- `enforceFor`: choose which declaration kinds are checked.
|
|
12
|
+
- `includeNonExported`: when `true`, also check non-exported top-level declarations (default: `false`).
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"rules": {
|
|
19
|
+
"tsdoc-require-2/require-link": [
|
|
20
|
+
"error",
|
|
21
|
+
{
|
|
22
|
+
"enforceFor": ["class", "function", "interface", "type", "enum", "variable", "object"]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
### ❌ Incorrect
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
/**
|
|
35
|
+
* Performs a task.
|
|
36
|
+
*/
|
|
37
|
+
export function runTask(value: string): string {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### ✅ Correct
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
/**
|
|
46
|
+
* Performs a task.
|
|
47
|
+
* @link
|
|
48
|
+
*/
|
|
49
|
+
export function runTask(value: string): string {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Further reading
|
|
55
|
+
|
|
56
|
+
- TSDoc tag reference: <https://tsdoc.org/pages/tags/link/>
|
|
57
|
+
- Rule index: [required-tags](../required-tags.md)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# tsdoc-require-2/require-override
|
|
2
|
+
|
|
3
|
+
Require the `@override` tag in TSDoc blocks for exported declarations.
|
|
4
|
+
|
|
5
|
+
## Rule details
|
|
6
|
+
|
|
7
|
+
By default, this rule reports exported declarations (and supported default exports) that have TSDoc but are missing `@override`. Set `includeNonExported: true` to also check non-exported top-level declarations.
|
|
8
|
+
|
|
9
|
+
It supports the same options as [`tsdoc-require-2/require`](../require.md):
|
|
10
|
+
|
|
11
|
+
- `enforceFor`: choose which declaration kinds are checked.
|
|
12
|
+
- `includeNonExported`: when `true`, also check non-exported top-level declarations (default: `false`).
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"rules": {
|
|
19
|
+
"tsdoc-require-2/require-override": [
|
|
20
|
+
"error",
|
|
21
|
+
{
|
|
22
|
+
"enforceFor": ["class", "function", "interface", "type", "enum", "variable", "object"]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
### ❌ Incorrect
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
/**
|
|
35
|
+
* Performs a task.
|
|
36
|
+
*/
|
|
37
|
+
export function runTask(value: string): string {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### ✅ Correct
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
/**
|
|
46
|
+
* Performs a task.
|
|
47
|
+
* @override
|
|
48
|
+
*/
|
|
49
|
+
export function runTask(value: string): string {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Further reading
|
|
55
|
+
|
|
56
|
+
- TSDoc tag reference: <https://tsdoc.org/pages/tags/override/>
|
|
57
|
+
- Rule index: [required-tags](../required-tags.md)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# tsdoc-require-2/require-package-documentation
|
|
2
|
+
|
|
3
|
+
Require the `@packageDocumentation` tag in TSDoc blocks for exported declarations.
|
|
4
|
+
|
|
5
|
+
## Rule details
|
|
6
|
+
|
|
7
|
+
By default, this rule reports exported declarations (and supported default exports) that have TSDoc but are missing `@packageDocumentation`. Set `includeNonExported: true` to also check non-exported top-level declarations.
|
|
8
|
+
|
|
9
|
+
It supports the same options as [`tsdoc-require-2/require`](../require.md):
|
|
10
|
+
|
|
11
|
+
- `enforceFor`: choose which declaration kinds are checked.
|
|
12
|
+
- `includeNonExported`: when `true`, also check non-exported top-level declarations (default: `false`).
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"rules": {
|
|
19
|
+
"tsdoc-require-2/require-package-documentation": [
|
|
20
|
+
"error",
|
|
21
|
+
{
|
|
22
|
+
"enforceFor": ["class", "function", "interface", "type", "enum", "variable", "object"]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
### ❌ Incorrect
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
/**
|
|
35
|
+
* Performs a task.
|
|
36
|
+
*/
|
|
37
|
+
export function runTask(value: string): string {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### ✅ Correct
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
/**
|
|
46
|
+
* Performs a task.
|
|
47
|
+
* @packageDocumentation
|
|
48
|
+
*/
|
|
49
|
+
export function runTask(value: string): string {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Further reading
|
|
55
|
+
|
|
56
|
+
- TSDoc tag reference: <https://tsdoc.org/pages/tags/packagedocumentation/>
|
|
57
|
+
- Rule index: [required-tags](../required-tags.md)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# tsdoc-require-2/require-param
|
|
2
|
+
|
|
3
|
+
Require the `@param` tag in TSDoc blocks for exported declarations.
|
|
4
|
+
|
|
5
|
+
## Rule details
|
|
6
|
+
|
|
7
|
+
By default, this rule reports exported declarations (and supported default exports) that have TSDoc but are missing `@param`. Set `includeNonExported: true` to also check non-exported top-level declarations.
|
|
8
|
+
|
|
9
|
+
It supports the same options as [`tsdoc-require-2/require`](../require.md):
|
|
10
|
+
|
|
11
|
+
- `enforceFor`: choose which declaration kinds are checked.
|
|
12
|
+
- `includeNonExported`: when `true`, also check non-exported top-level declarations (default: `false`).
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"rules": {
|
|
19
|
+
"tsdoc-require-2/require-param": [
|
|
20
|
+
"error",
|
|
21
|
+
{
|
|
22
|
+
"enforceFor": ["class", "function", "interface", "type", "enum", "variable", "object"]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
### ❌ Incorrect
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
/**
|
|
35
|
+
* Performs a task.
|
|
36
|
+
*/
|
|
37
|
+
export function runTask(value: string): string {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### ✅ Correct
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
/**
|
|
46
|
+
* Performs a task.
|
|
47
|
+
* @param
|
|
48
|
+
*/
|
|
49
|
+
export function runTask(value: string): string {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Further reading
|
|
55
|
+
|
|
56
|
+
- TSDoc tag reference: <https://tsdoc.org/pages/tags/param/>
|
|
57
|
+
- Rule index: [required-tags](../required-tags.md)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# tsdoc-require-2/require-private-remarks
|
|
2
|
+
|
|
3
|
+
Require the `@privateRemarks` tag in TSDoc blocks for exported declarations.
|
|
4
|
+
|
|
5
|
+
## Rule details
|
|
6
|
+
|
|
7
|
+
By default, this rule reports exported declarations (and supported default exports) that have TSDoc but are missing `@privateRemarks`. Set `includeNonExported: true` to also check non-exported top-level declarations.
|
|
8
|
+
|
|
9
|
+
It supports the same options as [`tsdoc-require-2/require`](../require.md):
|
|
10
|
+
|
|
11
|
+
- `enforceFor`: choose which declaration kinds are checked.
|
|
12
|
+
- `includeNonExported`: when `true`, also check non-exported top-level declarations (default: `false`).
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"rules": {
|
|
19
|
+
"tsdoc-require-2/require-private-remarks": [
|
|
20
|
+
"error",
|
|
21
|
+
{
|
|
22
|
+
"enforceFor": ["class", "function", "interface", "type", "enum", "variable", "object"]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
### ❌ Incorrect
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
/**
|
|
35
|
+
* Performs a task.
|
|
36
|
+
*/
|
|
37
|
+
export function runTask(value: string): string {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### ✅ Correct
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
/**
|
|
46
|
+
* Performs a task.
|
|
47
|
+
* @privateRemarks
|
|
48
|
+
*/
|
|
49
|
+
export function runTask(value: string): string {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Further reading
|
|
55
|
+
|
|
56
|
+
- TSDoc tag reference: <https://tsdoc.org/pages/tags/privateremarks/>
|
|
57
|
+
- Rule index: [required-tags](../required-tags.md)
|