-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin-jsdoc.js
247 lines (175 loc) · 5.37 KB
/
plugin-jsdoc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
module.exports = {
plugins: [
'jsdoc',
],
rules: {
/**
* Checks that `@access` tags are valid.
*/
'jsdoc/check-access': ['off'],
/**
* Reports invalid alignment of JSDoc block asterisks.
*/
'jsdoc/check-alignment': ['warn'],
/**
* Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.
*/
'jsdoc/check-examples': ['warn'],
/**
* Reports invalid padding inside JSDoc blocks.
*/
'jsdoc/check-indentation': ['warn'],
/**
* Ensures that parameter names in JSDoc match those in the function declaration.
*/
'jsdoc/check-param-names': ['warn'],
/**
* Ensures that property names in JSDoc are not duplicated on the same block and that nested properties have defined roots.
*/
'jsdoc/check-property-names': ['off'],
/**
* Reports against Google Closure Compiler syntax.
*/
'jsdoc/check-syntax': ['off'],
/**
* Reports invalid block tag names.
*/
'jsdoc/check-tag-names': ['warn', {
definedTags: ['endpoint'],
}],
/**
* Reports invalid value types.
*/
'jsdoc/check-types': ['warn'],
/**
* Checks the values of specific metadata tags.
*
* https://github.com/gajus/eslint-plugin-jsdoc/blob/master/README.md#check-values
*/
'jsdoc/check-values': ['off'],
/**
* Expects specific tags to be empty of any content.
*
* https://github.com/gajus/eslint-plugin-jsdoc/blob/master/README.md#empty-tags
*/
'jsdoc/empty-tags': ['off'],
/**
* Reports an issue with any non-constructor function using @implements.
*/
'jsdoc/implements-on-classes': ['off'],
/**
* Enforces a regular expression pattern on descriptions.
*/
'jsdoc/match-description': ['off'],
/**
* Enforces a consistent padding of the block description.
*/
'jsdoc/newline-after-description': ['off'],
/**
* Checks for multi-line-style comments which fail to meet the criteria of a jsdoc block.
*/
'jsdoc/no-bad-blocks': ['error'],
/**
* Reports defaults being used on the relevant portion of `@param` or `@default`.
*/
'jsdoc/no-defaults': ['off'],
/**
* This rule reports types being used on `@param` or `@returns`.
*/
'jsdoc/no-types': ['off'],
/**
* Checks that types in jsdoc comments are defined. This can be used to check unimported types.
*/
'jsdoc/no-undefined-types': ['warn'],
/**
* Requires that block description, explicit `@description`, and `@param`/`@returns` tag descriptions are written in complete sentences
*/
'jsdoc/require-description-complete-sentence': ['off'],
/**
* Requires that all functions have a description.
*/
'jsdoc/require-description': ['off'],
/**
* Requires that all functions have examples.
*/
'jsdoc/require-example': ['off'],
/**
* Checks that all files have a `@file`, `@fileoverview`, or `@overview` tag.
*/
'jsdoc/require-file-overview': ['off'],
/**
* Requires a hyphen before the `@param` description.
*
* ಠ_ಠ
*/
'jsdoc/require-hyphen-before-param-description': ['off'],
/**
* Checks for presence of jsdoc comments, on class declarations as well as functions.
*/
'jsdoc/require-jsdoc': ['warn', {
require: {
FunctionDeclaration: true,
MethodDefinition: true,
ClassDeclaration: true,
ArrowFunctionExpression: false,
FunctionExpression: false,
},
}],
/**
* Requires that each `@param` tag has a `description` value.
*/
'jsdoc/require-param-description': ['off'],
/**
* Requires that each `@param` tag has a `name` value
*/
'jsdoc/require-param-name': ['warn'],
/**
* Requires that each `@param` tag has a `type` value.
*/
'jsdoc/require-param-type': ['warn'],
/**
* Requires that all function parameters are documented.
*/
'jsdoc/require-param': ['warn', {
exemptedBy: ['endpoint', 'inheritdoc'],
}],
/**
* Requires that each `@property` tag has a `description` value.
*/
'jsdoc/require-property-description': ['off'],
/**
* Requires that each `@property` tag has a `name` value.
*/
'jsdoc/require-property-name': ['warn'],
/**
* Requires that each `@property` tag has a `type` value.
*/
'jsdoc/require-property-type': ['warn'],
/**
* Requires that all `@typedef` and `@namespace` tags have `@property` when their type is a plain `object`, `Object`, or `PlainObject`.
*/
'jsdoc/require-property': ['off'],
/**
* Requires a return statement in function body if a `@returns` tag is specified in jsdoc comment.
*/
'jsdoc/require-returns-check': ['warn'],
/**
* Requires that the `@returns` tag has a `description` value.
*/
'jsdoc/require-returns-description': ['off'],
/**
* Requires that the `@returns` tag has a `type` value.
*/
'jsdoc/require-returns-type': ['warn'],
/**
* Requires returns are documented.
*/
'jsdoc/require-returns': ['warn', {
exemptedBy: ['endpoint', 'inheritdoc', 'yields'],
}],
/**
* Requires all types to be valid JSDoc or Closure compiler types without syntax errors.
*/
'jsdoc/valid-types': ['off'],
},
}