eslint-plugin-jsdoc 44.2.1 → 44.2.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 +5 -0
- package/dist/getDefaultTagStructureForMode.js +71 -62
- package/dist/getDefaultTagStructureForMode.js.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/iterateJsdoc.js +410 -31
- package/dist/iterateJsdoc.js.map +1 -1
- package/dist/jsdocUtils.js +251 -70
- package/dist/jsdocUtils.js.map +1 -1
- package/dist/rules/checkLineAlignment.js +1 -1
- package/dist/rules/checkLineAlignment.js.map +1 -1
- package/dist/rules/checkTypes.js +1 -1
- package/dist/rules/checkTypes.js.map +1 -1
- package/dist/rules/emptyTags.js.map +1 -1
- package/dist/rules/matchDescription.js +1 -1
- package/dist/rules/matchDescription.js.map +1 -1
- package/dist/rules/noBadBlocks.js +1 -1
- package/dist/rules/noBadBlocks.js.map +1 -1
- package/dist/rules/requireDescriptionCompleteSentence.js +1 -1
- package/dist/rules/requireDescriptionCompleteSentence.js.map +1 -1
- package/dist/rules/requireHyphenBeforeParamDescription.js +21 -5
- package/dist/rules/requireHyphenBeforeParamDescription.js.map +1 -1
- package/dist/rules/requireJsdoc.js +4 -2
- package/dist/rules/requireJsdoc.js.map +1 -1
- package/dist/tagNames.js +27 -0
- package/dist/tagNames.js.map +1 -1
- package/dist/utils/hasReturnValue.js +16 -5
- package/dist/utils/hasReturnValue.js.map +1 -1
- package/docs/rules/no-undefined-types.md +18 -0
- package/docs/rules/require-hyphen-before-param-description.md +23 -0
- package/package.json +12 -5
- package/tsconfig.json +6 -2
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|
|
|
@@ -4,6 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {Map<string, Map<string, (string|boolean)>>} TagStructure
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* @param {import('./jsdocUtils.js').ParserMode} mode
|
|
12
|
+
* @returns {TagStructure}
|
|
13
|
+
*/
|
|
7
14
|
const getDefaultTagStructureForMode = mode => {
|
|
8
15
|
const isJsdoc = mode === 'jsdoc';
|
|
9
16
|
const isClosure = mode === 'closure';
|
|
@@ -39,166 +46,168 @@ const getDefaultTagStructureForMode = mode => {
|
|
|
39
46
|
// Todo: Should support special processing for "name" as distinct from
|
|
40
47
|
// "namepath" (e.g., param can't define a namepath)
|
|
41
48
|
|
|
42
|
-
// Once checking inline tags:
|
|
43
49
|
// Todo: Should support a `tutorialID` type (for `@tutorial` block and
|
|
44
50
|
// inline)
|
|
45
51
|
|
|
46
|
-
|
|
52
|
+
/**
|
|
53
|
+
* @type {TagStructure}
|
|
54
|
+
*/
|
|
55
|
+
return new Map([['alias', new Map( /** @type {[string, string|boolean][]} */[
|
|
47
56
|
// Signature seems to require a "namepath" (and no counter-examples)
|
|
48
57
|
['namepathRole', 'namepath-defining'],
|
|
49
58
|
// "namepath"
|
|
50
|
-
['typeOrNameRequired', true]])], ['arg', new Map([['namepathRole', 'namepath-defining'],
|
|
59
|
+
['typeOrNameRequired', true]])], ['arg', new Map( /** @type {[string, string|boolean][]} */[['namepathRole', 'namepath-defining'],
|
|
51
60
|
// See `param`
|
|
52
61
|
['nameRequired', true],
|
|
53
62
|
// Has no formal signature in the docs but shows curly brackets
|
|
54
63
|
// in the examples
|
|
55
|
-
['typeAllowed', true]])], ['argument', new Map([['namepathRole', 'namepath-defining'],
|
|
64
|
+
['typeAllowed', true]])], ['argument', new Map( /** @type {[string, string|boolean][]} */[['namepathRole', 'namepath-defining'],
|
|
56
65
|
// See `param`
|
|
57
66
|
['nameRequired', true],
|
|
58
67
|
// Has no formal signature in the docs but shows curly brackets
|
|
59
68
|
// in the examples
|
|
60
|
-
['typeAllowed', true]])], ['augments', new Map([
|
|
69
|
+
['typeAllowed', true]])], ['augments', new Map( /** @type {[string, string|boolean][]} */[
|
|
61
70
|
// Signature seems to require a "namepath" (and no counter-examples)
|
|
62
71
|
['namepathRole', 'namepath-referencing'],
|
|
63
72
|
// Does not show curly brackets in either the signature or examples
|
|
64
73
|
['typeAllowed', true],
|
|
65
74
|
// "namepath"
|
|
66
|
-
['typeOrNameRequired', true]])], ['borrows', new Map([
|
|
75
|
+
['typeOrNameRequired', true]])], ['borrows', new Map( /** @type {[string, string|boolean][]} */[
|
|
67
76
|
// `borrows` has a different format, however, so needs special parsing;
|
|
68
77
|
// seems to require both, and as "namepath"'s
|
|
69
78
|
['namepathRole', 'namepath-referencing'],
|
|
70
79
|
// "namepath"
|
|
71
|
-
['typeOrNameRequired', true]])], ['callback', new Map([
|
|
80
|
+
['typeOrNameRequired', true]])], ['callback', new Map( /** @type {[string, string|boolean][]} */[
|
|
72
81
|
// Seems to require a "namepath" in the signature (with no
|
|
73
82
|
// counter-examples); TypeScript does not enforce but seems
|
|
74
83
|
// problematic as not attached so presumably not useable without it
|
|
75
84
|
['namepathRole', 'namepath-defining'],
|
|
76
85
|
// "namepath"
|
|
77
|
-
['nameRequired', true]])], ['class', new Map([
|
|
86
|
+
['nameRequired', true]])], ['class', new Map( /** @type {[string, string|boolean][]} */[
|
|
78
87
|
// Allows for "name"'s in signature, but indicated as optional
|
|
79
88
|
['namepathRole', 'namepath-defining'],
|
|
80
89
|
// Not in use, but should be this value if using to power `empty-tags`
|
|
81
|
-
['nameAllowed', true], ['typeAllowed', true]])], ['const', new Map([
|
|
90
|
+
['nameAllowed', true], ['typeAllowed', true]])], ['const', new Map( /** @type {[string, string|boolean][]} */[
|
|
82
91
|
// Allows for "name"'s in signature, but indicated as optional
|
|
83
|
-
['namepathRole', 'namepath-defining'], ['typeAllowed', true]])], ['constant', new Map([
|
|
92
|
+
['namepathRole', 'namepath-defining'], ['typeAllowed', true]])], ['constant', new Map( /** @type {[string, string|boolean][]} */[
|
|
84
93
|
// Allows for "name"'s in signature, but indicated as optional
|
|
85
|
-
['namepathRole', 'namepath-defining'], ['typeAllowed', true]])], ['constructor', new Map([
|
|
94
|
+
['namepathRole', 'namepath-defining'], ['typeAllowed', true]])], ['constructor', new Map( /** @type {[string, string|boolean][]} */[
|
|
86
95
|
// Allows for "name"'s in signature, but indicated as optional
|
|
87
|
-
['namepathRole', 'namepath-defining'], ['typeAllowed', true]])], ['constructs', new Map([
|
|
96
|
+
['namepathRole', 'namepath-defining'], ['typeAllowed', true]])], ['constructs', new Map( /** @type {[string, string|boolean][]} */[
|
|
88
97
|
// Allows for "name"'s in signature, but indicated as optional
|
|
89
|
-
['namepathRole', 'namepath-defining'], ['nameRequired', false], ['typeAllowed', false]])], ['define', new Map([['typeRequired', isClosure]])], ['emits', new Map([
|
|
98
|
+
['namepathRole', 'namepath-defining'], ['nameRequired', false], ['typeAllowed', false]])], ['define', new Map( /** @type {[string, string|boolean][]} */[['typeRequired', isClosure]])], ['emits', new Map( /** @type {[string, string|boolean][]} */[
|
|
90
99
|
// Signature seems to require a "name" (of an event) and no counter-examples
|
|
91
|
-
['namepathRole', 'namepath-referencing'], ['nameRequired', true], ['typeAllowed', false]])], ['enum', new Map([
|
|
100
|
+
['namepathRole', 'namepath-referencing'], ['nameRequired', true], ['typeAllowed', false]])], ['enum', new Map( /** @type {[string, string|boolean][]} */[
|
|
92
101
|
// Has example showing curly brackets but not in doc signature
|
|
93
|
-
['typeAllowed', true]])], ['event', new Map([
|
|
102
|
+
['typeAllowed', true]])], ['event', new Map( /** @type {[string, string|boolean][]} */[
|
|
94
103
|
// The doc signature of `event` seems to require a "name"
|
|
95
104
|
['nameRequired', true],
|
|
96
105
|
// Appears to require a "name" in its signature, albeit somewhat
|
|
97
106
|
// different from other "name"'s (including as described
|
|
98
107
|
// at https://jsdoc.app/about-namepaths.html )
|
|
99
|
-
['namepathRole', 'namepath-defining']])], ['exception', new Map([
|
|
108
|
+
['namepathRole', 'namepath-defining']])], ['exception', new Map( /** @type {[string, string|boolean][]} */[
|
|
100
109
|
// Shows curly brackets in the signature and in the examples
|
|
101
110
|
['typeAllowed', true]])],
|
|
102
111
|
// Closure
|
|
103
|
-
['export', new Map([['typeAllowed', isClosureOrPermissive]])], ['exports', new Map([['namepathRole', 'namepath-defining'], ['nameRequired', isJsdoc], ['typeAllowed', isClosureOrPermissive]])], ['extends', new Map([
|
|
112
|
+
['export', new Map( /** @type {[string, string|boolean][]} */[['typeAllowed', isClosureOrPermissive]])], ['exports', new Map( /** @type {[string, string|boolean][]} */[['namepathRole', 'namepath-defining'], ['nameRequired', isJsdoc], ['typeAllowed', isClosureOrPermissive]])], ['extends', new Map( /** @type {[string, string|boolean][]} */[
|
|
104
113
|
// Signature seems to require a "namepath" (and no counter-examples)
|
|
105
114
|
['namepathRole', 'namepath-referencing'],
|
|
106
115
|
// Does not show curly brackets in either the signature or examples
|
|
107
116
|
['typeAllowed', isTypescriptOrClosure || isPermissive], ['nameRequired', isJsdoc],
|
|
108
117
|
// "namepath"
|
|
109
|
-
['typeOrNameRequired', isTypescriptOrClosure || isPermissive]])], ['external', new Map([
|
|
118
|
+
['typeOrNameRequired', isTypescriptOrClosure || isPermissive]])], ['external', new Map( /** @type {[string, string|boolean][]} */[
|
|
110
119
|
// Appears to require a "name" in its signature, albeit somewhat
|
|
111
120
|
// different from other "name"'s (including as described
|
|
112
121
|
// at https://jsdoc.app/about-namepaths.html )
|
|
113
122
|
['namepathRole', 'namepath-defining'],
|
|
114
123
|
// "name" (and a special syntax for the `external` name)
|
|
115
|
-
['nameRequired', true], ['typeAllowed', false]])], ['fires', new Map([
|
|
124
|
+
['nameRequired', true], ['typeAllowed', false]])], ['fires', new Map( /** @type {[string, string|boolean][]} */[
|
|
116
125
|
// Signature seems to require a "name" (of an event) and no
|
|
117
126
|
// counter-examples
|
|
118
|
-
['namepathRole', 'namepath-referencing'], ['nameRequired', true], ['typeAllowed', false]])], ['function', new Map([
|
|
127
|
+
['namepathRole', 'namepath-referencing'], ['nameRequired', true], ['typeAllowed', false]])], ['function', new Map( /** @type {[string, string|boolean][]} */[
|
|
119
128
|
// Allows for "name"'s in signature, but indicated as optional
|
|
120
|
-
['namepathRole', 'namepath-defining'], ['nameRequired', false], ['typeAllowed', false]])], ['func', new Map([
|
|
129
|
+
['namepathRole', 'namepath-defining'], ['nameRequired', false], ['typeAllowed', false]])], ['func', new Map( /** @type {[string, string|boolean][]} */[
|
|
121
130
|
// Allows for "name"'s in signature, but indicated as optional
|
|
122
|
-
['namepathRole', 'namepath-defining']])], ['host', new Map([
|
|
131
|
+
['namepathRole', 'namepath-defining']])], ['host', new Map( /** @type {[string, string|boolean][]} */[
|
|
123
132
|
// Appears to require a "name" in its signature, albeit somewhat
|
|
124
133
|
// different from other "name"'s (including as described
|
|
125
134
|
// at https://jsdoc.app/about-namepaths.html )
|
|
126
135
|
['namepathRole', 'namepath-defining'],
|
|
127
136
|
// See `external`
|
|
128
|
-
['nameRequired', true], ['typeAllowed', false]])], ['interface', new Map([
|
|
137
|
+
['nameRequired', true], ['typeAllowed', false]])], ['interface', new Map( /** @type {[string, string|boolean][]} */[
|
|
129
138
|
// Allows for "name" in signature, but indicates as optional
|
|
130
139
|
['namepathRole', isJsdocTypescriptOrPermissive ? 'namepath-defining' : false],
|
|
131
140
|
// Not in use, but should be this value if using to power `empty-tags`
|
|
132
|
-
['nameAllowed', isClosure], ['typeAllowed', false]])], ['internal', new Map([
|
|
141
|
+
['nameAllowed', isClosure], ['typeAllowed', false]])], ['internal', new Map( /** @type {[string, string|boolean][]} */[
|
|
133
142
|
// https://www.typescriptlang.org/tsconfig/#stripInternal
|
|
134
143
|
['namepathRole', false],
|
|
135
144
|
// Not in use, but should be this value if using to power `empty-tags`
|
|
136
|
-
['nameAllowed', false]])], ['implements', new Map([
|
|
145
|
+
['nameAllowed', false]])], ['implements', new Map( /** @type {[string, string|boolean][]} */[
|
|
137
146
|
// Shows curly brackets in the doc signature and examples
|
|
138
147
|
// "typeExpression"
|
|
139
|
-
['typeRequired', true]])], ['lends', new Map([
|
|
148
|
+
['typeRequired', true]])], ['lends', new Map( /** @type {[string, string|boolean][]} */[
|
|
140
149
|
// Signature seems to require a "namepath" (and no counter-examples)
|
|
141
150
|
['namepathRole', 'namepath-referencing'],
|
|
142
151
|
// "namepath"
|
|
143
|
-
['typeOrNameRequired', true]])], ['link', new Map([
|
|
152
|
+
['typeOrNameRequired', true]])], ['link', new Map( /** @type {[string, string|boolean][]} */[
|
|
144
153
|
// Signature seems to require a namepath OR URL and might be checked as such.
|
|
145
|
-
['namepathRole', 'namepath-or-url-referencing']])], ['linkcode', new Map([
|
|
154
|
+
['namepathRole', 'namepath-or-url-referencing']])], ['linkcode', new Map( /** @type {[string, string|boolean][]} */[
|
|
146
155
|
// Synonym for "link"
|
|
147
156
|
// Signature seems to require a namepath OR URL and might be checked as such.
|
|
148
|
-
['namepathRole', 'namepath-or-url-referencing']])], ['linkplain', new Map([
|
|
157
|
+
['namepathRole', 'namepath-or-url-referencing']])], ['linkplain', new Map( /** @type {[string, string|boolean][]} */[
|
|
149
158
|
// Synonym for "link"
|
|
150
159
|
// Signature seems to require a namepath OR URL and might be checked as such.
|
|
151
|
-
['namepathRole', 'namepath-or-url-referencing']])], ['listens', new Map([
|
|
160
|
+
['namepathRole', 'namepath-or-url-referencing']])], ['listens', new Map( /** @type {[string, string|boolean][]} */[
|
|
152
161
|
// Signature seems to require a "name" (of an event) and no
|
|
153
162
|
// counter-examples
|
|
154
|
-
['namepathRole', 'namepath-referencing'], ['nameRequired', true], ['typeAllowed', false]])], ['member', new Map([
|
|
163
|
+
['namepathRole', 'namepath-referencing'], ['nameRequired', true], ['typeAllowed', false]])], ['member', new Map( /** @type {[string, string|boolean][]} */[
|
|
155
164
|
// Allows for "name"'s in signature, but indicated as optional
|
|
156
165
|
['namepathRole', 'namepath-defining'],
|
|
157
166
|
// Has example showing curly brackets but not in doc signature
|
|
158
|
-
['typeAllowed', true]])], ['memberof', new Map([
|
|
167
|
+
['typeAllowed', true]])], ['memberof', new Map( /** @type {[string, string|boolean][]} */[
|
|
159
168
|
// Signature seems to require a "namepath" (and no counter-examples),
|
|
160
169
|
// though it allows an incomplete namepath ending with connecting symbol
|
|
161
170
|
['namepathRole', 'namepath-referencing'],
|
|
162
171
|
// "namepath"
|
|
163
|
-
['typeOrNameRequired', true]])], ['memberof!', new Map([
|
|
172
|
+
['typeOrNameRequired', true]])], ['memberof!', new Map( /** @type {[string, string|boolean][]} */[
|
|
164
173
|
// Signature seems to require a "namepath" (and no counter-examples),
|
|
165
174
|
// though it allows an incomplete namepath ending with connecting symbol
|
|
166
175
|
['namepathRole', 'namepath-referencing'],
|
|
167
176
|
// "namepath"
|
|
168
|
-
['typeOrNameRequired', true]])], ['method', new Map([
|
|
177
|
+
['typeOrNameRequired', true]])], ['method', new Map( /** @type {[string, string|boolean][]} */[
|
|
169
178
|
// Allows for "name"'s in signature, but indicated as optional
|
|
170
|
-
['namepathRole', 'namepath-defining']])], ['mixes', new Map([
|
|
179
|
+
['namepathRole', 'namepath-defining']])], ['mixes', new Map( /** @type {[string, string|boolean][]} */[
|
|
171
180
|
// Signature seems to require a "OtherObjectPath" with no
|
|
172
181
|
// counter-examples
|
|
173
182
|
['namepathRole', 'namepath-referencing'],
|
|
174
183
|
// "OtherObjectPath"
|
|
175
|
-
['typeOrNameRequired', true]])], ['mixin', new Map([
|
|
184
|
+
['typeOrNameRequired', true]])], ['mixin', new Map( /** @type {[string, string|boolean][]} */[
|
|
176
185
|
// Allows for "name"'s in signature, but indicated as optional
|
|
177
|
-
['namepathRole', 'namepath-defining'], ['nameRequired', false], ['typeAllowed', false]])], ['modifies', new Map([
|
|
186
|
+
['namepathRole', 'namepath-defining'], ['nameRequired', false], ['typeAllowed', false]])], ['modifies', new Map( /** @type {[string, string|boolean][]} */[
|
|
178
187
|
// Has no documentation, but test example has curly brackets, and
|
|
179
188
|
// "name" would be suggested rather than "namepath" based on example;
|
|
180
189
|
// not sure if name is required
|
|
181
|
-
['typeAllowed', true]])], ['module', new Map([
|
|
190
|
+
['typeAllowed', true]])], ['module', new Map( /** @type {[string, string|boolean][]} */[
|
|
182
191
|
// Optional "name" and no curly brackets
|
|
183
192
|
// this block impacts `no-undefined-types` and `valid-types` (search for
|
|
184
193
|
// "isNamepathDefiningTag|tagMightHaveNamepath|tagMightHaveEitherTypeOrNamePosition")
|
|
185
194
|
['namepathRole', isJsdoc ? 'namepath-defining' : 'text'],
|
|
186
195
|
// Shows the signature with curly brackets but not in the example
|
|
187
|
-
['typeAllowed', true]])], ['name', new Map([
|
|
196
|
+
['typeAllowed', true]])], ['name', new Map( /** @type {[string, string|boolean][]} */[
|
|
188
197
|
// Seems to require a "namepath" in the signature (with no
|
|
189
198
|
// counter-examples)
|
|
190
199
|
['namepathRole', 'namepath-defining'],
|
|
191
200
|
// "namepath"
|
|
192
201
|
['nameRequired', true],
|
|
193
202
|
// "namepath"
|
|
194
|
-
['typeOrNameRequired', true]])], ['namespace', new Map([
|
|
203
|
+
['typeOrNameRequired', true]])], ['namespace', new Map( /** @type {[string, string|boolean][]} */[
|
|
195
204
|
// Allows for "name"'s in signature, but indicated as optional
|
|
196
205
|
['namepathRole', 'namepath-defining'],
|
|
197
206
|
// Shows the signature with curly brackets but not in the example
|
|
198
|
-
['typeAllowed', true]])], ['package', new Map([
|
|
207
|
+
['typeAllowed', true]])], ['package', new Map( /** @type {[string, string|boolean][]} */[
|
|
199
208
|
// Shows the signature with curly brackets but not in the example
|
|
200
209
|
// "typeExpression"
|
|
201
|
-
['typeAllowed', isClosureOrPermissive]])], ['param', new Map([['namepathRole', 'namepath-defining'],
|
|
210
|
+
['typeAllowed', isClosureOrPermissive]])], ['param', new Map( /** @type {[string, string|boolean][]} */[['namepathRole', 'namepath-defining'],
|
|
202
211
|
// Though no signature provided requiring, per
|
|
203
212
|
// https://jsdoc.app/tags-param.html:
|
|
204
213
|
// "The @param tag requires you to specify the name of the parameter you
|
|
@@ -206,55 +215,55 @@ const getDefaultTagStructureForMode = mode => {
|
|
|
206
215
|
['nameRequired', true],
|
|
207
216
|
// Has no formal signature in the docs but shows curly brackets
|
|
208
217
|
// in the examples
|
|
209
|
-
['typeAllowed', true]])], ['private', new Map([
|
|
218
|
+
['typeAllowed', true]])], ['private', new Map( /** @type {[string, string|boolean][]} */[
|
|
210
219
|
// Shows the signature with curly brackets but not in the example
|
|
211
220
|
// "typeExpression"
|
|
212
|
-
['typeAllowed', isClosureOrPermissive]])], ['prop', new Map([['namepathRole', 'namepath-defining'],
|
|
221
|
+
['typeAllowed', isClosureOrPermissive]])], ['prop', new Map( /** @type {[string, string|boolean][]} */[['namepathRole', 'namepath-defining'],
|
|
213
222
|
// See `property`
|
|
214
223
|
['nameRequired', true],
|
|
215
224
|
// Has no formal signature in the docs but shows curly brackets
|
|
216
225
|
// in the examples
|
|
217
|
-
['typeAllowed', true]])], ['property', new Map([['namepathRole', 'namepath-defining'],
|
|
226
|
+
['typeAllowed', true]])], ['property', new Map( /** @type {[string, string|boolean][]} */[['namepathRole', 'namepath-defining'],
|
|
218
227
|
// No docs indicate required, but since parallel to `param`, we treat as
|
|
219
228
|
// such:
|
|
220
229
|
['nameRequired', true],
|
|
221
230
|
// Has no formal signature in the docs but shows curly brackets
|
|
222
231
|
// in the examples
|
|
223
|
-
['typeAllowed', true]])], ['protected', new Map([
|
|
232
|
+
['typeAllowed', true]])], ['protected', new Map( /** @type {[string, string|boolean][]} */[
|
|
224
233
|
// Shows the signature with curly brackets but not in the example
|
|
225
234
|
// "typeExpression"
|
|
226
|
-
['typeAllowed', isClosureOrPermissive]])], ['public', new Map([
|
|
235
|
+
['typeAllowed', isClosureOrPermissive]])], ['public', new Map( /** @type {[string, string|boolean][]} */[
|
|
227
236
|
// Does not show a signature nor show curly brackets in the example
|
|
228
|
-
['typeAllowed', isClosureOrPermissive]])], ['requires', new Map([
|
|
237
|
+
['typeAllowed', isClosureOrPermissive]])], ['requires', new Map( /** @type {[string, string|boolean][]} */[
|
|
229
238
|
// <someModuleName>
|
|
230
|
-
['namepathRole', 'namepath-referencing'], ['nameRequired', true], ['typeAllowed', false]])], ['returns', new Map([
|
|
239
|
+
['namepathRole', 'namepath-referencing'], ['nameRequired', true], ['typeAllowed', false]])], ['returns', new Map( /** @type {[string, string|boolean][]} */[
|
|
231
240
|
// Shows curly brackets in the signature and in the examples
|
|
232
|
-
['typeAllowed', true]])], ['return', new Map([
|
|
241
|
+
['typeAllowed', true]])], ['return', new Map( /** @type {[string, string|boolean][]} */[
|
|
233
242
|
// Shows curly brackets in the signature and in the examples
|
|
234
|
-
['typeAllowed', true]])], ['satisfies', new Map([
|
|
243
|
+
['typeAllowed', true]])], ['satisfies', new Map( /** @type {[string, string|boolean][]} */[
|
|
235
244
|
// Shows curly brackets in the doc signature and examples
|
|
236
|
-
['typeRequired', true]])], ['see', new Map([
|
|
245
|
+
['typeRequired', true]])], ['see', new Map( /** @type {[string, string|boolean][]} */[
|
|
237
246
|
// Signature allows for "namepath" or text, so user must configure to
|
|
238
247
|
// 'namepath-referencing' to enforce checks
|
|
239
|
-
['namepathRole', 'text']])], ['static', new Map([
|
|
248
|
+
['namepathRole', 'text']])], ['static', new Map( /** @type {[string, string|boolean][]} */[
|
|
240
249
|
// Does not show a signature nor show curly brackets in the example
|
|
241
|
-
['typeAllowed', isClosureOrPermissive]])], ['suppress', new Map([['namepathRole', !isClosure], ['typeRequired', isClosure]])], ['template', new Map([['namepathRole', isJsdoc ? 'text' : 'namepath-referencing'],
|
|
250
|
+
['typeAllowed', isClosureOrPermissive]])], ['suppress', new Map( /** @type {[string, string|boolean][]} */[['namepathRole', !isClosure], ['typeRequired', isClosure]])], ['template', new Map( /** @type {[string, string|boolean][]} */[['namepathRole', isJsdoc ? 'text' : 'namepath-referencing'],
|
|
242
251
|
// Though defines `namepathRole: 'namepath-defining'` in a sense, it is
|
|
243
252
|
// not parseable in the same way for template (e.g., allowing commas),
|
|
244
253
|
// so not adding
|
|
245
|
-
['typeAllowed', isTypescriptOrClosure || isPermissive]])], ['this', new Map([
|
|
254
|
+
['typeAllowed', isTypescriptOrClosure || isPermissive]])], ['this', new Map( /** @type {[string, string|boolean][]} */[
|
|
246
255
|
// Signature seems to require a "namepath" (and no counter-examples)
|
|
247
256
|
// Not used with namepath in Closure/TypeScript, however
|
|
248
257
|
['namepathRole', isJsdoc ? 'namepath-referencing' : false], ['typeRequired', isTypescriptOrClosure],
|
|
249
258
|
// namepath
|
|
250
|
-
['typeOrNameRequired', isJsdoc]])], ['throws', new Map([
|
|
259
|
+
['typeOrNameRequired', isJsdoc]])], ['throws', new Map( /** @type {[string, string|boolean][]} */[
|
|
251
260
|
// Shows curly brackets in the signature and in the examples
|
|
252
|
-
['typeAllowed', true]])], ['tutorial', new Map([
|
|
261
|
+
['typeAllowed', true]])], ['tutorial', new Map( /** @type {[string, string|boolean][]} */[
|
|
253
262
|
// (a tutorial ID)
|
|
254
|
-
['nameRequired', true], ['typeAllowed', false]])], ['type', new Map([
|
|
263
|
+
['nameRequired', true], ['typeAllowed', false]])], ['type', new Map( /** @type {[string, string|boolean][]} */[
|
|
255
264
|
// Shows curly brackets in the doc signature and examples
|
|
256
265
|
// "typeName"
|
|
257
|
-
['typeRequired', true]])], ['typedef', new Map([
|
|
266
|
+
['typeRequired', true]])], ['typedef', new Map( /** @type {[string, string|boolean][]} */[
|
|
258
267
|
// Seems to require a "namepath" in the signature (with no
|
|
259
268
|
// counter-examples)
|
|
260
269
|
['namepathRole', 'namepath-defining'],
|
|
@@ -269,13 +278,13 @@ const getDefaultTagStructureForMode = mode => {
|
|
|
269
278
|
['typeAllowed', true],
|
|
270
279
|
// TypeScript may allow it to be dropped if followed by @property or @member
|
|
271
280
|
// "namepath"
|
|
272
|
-
['typeOrNameRequired', !isTypescript]])], ['var', new Map([
|
|
281
|
+
['typeOrNameRequired', !isTypescript]])], ['var', new Map( /** @type {[string, string|boolean][]} */[
|
|
273
282
|
// Allows for "name"'s in signature, but indicated as optional
|
|
274
283
|
['namepathRole', 'namepath-defining'],
|
|
275
284
|
// Has example showing curly brackets but not in doc signature
|
|
276
|
-
['typeAllowed', true]])], ['yields', new Map([
|
|
285
|
+
['typeAllowed', true]])], ['yields', new Map( /** @type {[string, string|boolean][]} */[
|
|
277
286
|
// Shows curly brackets in the signature and in the examples
|
|
278
|
-
['typeAllowed', true]])], ['yield', new Map([
|
|
287
|
+
['typeAllowed', true]])], ['yield', new Map( /** @type {[string, string|boolean][]} */[
|
|
279
288
|
// Shows curly brackets in the signature and in the examples
|
|
280
289
|
['typeAllowed', true]])]]);
|
|
281
290
|
};
|
|
@@ -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-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,I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,CACE,aAAa,EAAE,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,CACp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AAG,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,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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AqB,CACtC;EAED;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":["/**\n * @typedef {Map<string, Map<string, (string|boolean)>>} TagStructure\n */\n/**\n * @param {import('./jsdocUtils.js').ParserMode} mode\n * @returns {TagStructure}\n */\nconst 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 // Todo: Should support a `tutorialID` type (for `@tutorial` block and\n // inline)\n\n /**\n * @type {TagStructure}\n */\n return new Map([\n [\n 'alias', new Map(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\n [\n 'typeRequired', isClosure,\n ],\n ])),\n ],\n\n [\n 'emits', new Map(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\n // Has example showing curly brackets but not in doc signature\n [\n 'typeAllowed', true,\n ],\n ])),\n ],\n\n [\n 'event', new Map(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\n [\n 'typeAllowed', isClosureOrPermissive,\n ],\n ])),\n ],\n\n [\n 'exports', new Map(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\n // Allows for \"name\"'s in signature, but indicated as optional\n [\n 'namepathRole', 'namepath-defining',\n ],\n ])),\n ],\n [\n 'mixes', new Map(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ])),\n ],\n [\n 'return', new Map(/** @type {[string, string|boolean][]} */ ([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ])),\n ],\n\n [\n 'satisfies', new Map(/** @type {[string, string|boolean][]} */ ([\n // Shows curly brackets in the doc signature and examples\n [\n 'typeRequired', true,\n ],\n ])),\n ],\n\n [\n 'see', new Map(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\n [\n 'namepathRole', !isClosure,\n ],\n [\n 'typeRequired', isClosure,\n ],\n ])),\n ],\n\n [\n 'template', new Map(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ])),\n ],\n\n [\n 'tutorial', new Map(/** @type {[string, string|boolean][]} */ ([\n // (a tutorial ID)\n [\n 'nameRequired', true,\n ],\n\n [\n 'typeAllowed', false,\n ],\n ])),\n ],\n\n [\n 'type', new Map(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\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(/** @type {[string, string|boolean][]} */ ([\n // Shows curly brackets in the signature and in the examples\n [\n 'typeAllowed', true,\n ],\n ])),\n ],\n [\n 'yield', new Map(/** @type {[string, string|boolean][]} */ ([\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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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;;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AO,EAAE,IAAIA,GAAG,EAAC,yCAA2C;EAC1D;EACA,CACE,aAAa,EAAE,IAAI,CACpB,CACD,CAAC,CACJ,CACF,CAAC;AACJ,CAAC;AAAC,IAAAC,QAAA,GAEaZ,6BAA6B;AAAAa,OAAA,CAAAC,OAAA,GAAAF,QAAA;AAAAG,MAAA,CAAAF,OAAA,GAAAA,OAAA,CAAAC,OAAA"}
|
package/dist/index.js
CHANGED
|
@@ -57,13 +57,11 @@ var _tagLines = _interopRequireDefault(require("./rules/tagLines"));
|
|
|
57
57
|
var _textEscaping = _interopRequireDefault(require("./rules/textEscaping"));
|
|
58
58
|
var _validTypes = _interopRequireDefault(require("./rules/validTypes"));
|
|
59
59
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
60
|
+
/**
|
|
61
|
+
* @type {import('eslint').ESLint.Plugin}
|
|
62
|
+
*/
|
|
60
63
|
const index = {
|
|
61
|
-
/* eslint-disable jsdoc/no-undefined-types -- Bug */
|
|
62
|
-
/**
|
|
63
|
-
* @type {Record<string, import('eslint').ESLint.ConfigData<import('eslint').Linter.RulesRecord>>}
|
|
64
|
-
*/
|
|
65
64
|
configs: {},
|
|
66
|
-
/* eslint-enable jsdoc/no-undefined-types -- Bug */
|
|
67
65
|
rules: {
|
|
68
66
|
'check-access': _checkAccess.default,
|
|
69
67
|
'check-alignment': _checkAlignment.default,
|
|
@@ -207,6 +205,10 @@ const createRecommendedTypeScriptRuleset = warnOrError => {
|
|
|
207
205
|
};
|
|
208
206
|
};
|
|
209
207
|
|
|
208
|
+
/* istanbul ignore if -- TS */
|
|
209
|
+
if (!index.configs) {
|
|
210
|
+
throw new Error('TypeScript guard');
|
|
211
|
+
}
|
|
210
212
|
index.configs.recommended = createRecommendedRuleset('warn');
|
|
211
213
|
index.configs['recommended-error'] = createRecommendedRuleset('error');
|
|
212
214
|
index.configs['recommended-typescript'] = createRecommendedTypeScriptRuleset('warn');
|