File tree Expand file tree Collapse file tree 4 files changed +43
-2
lines changed Expand file tree Collapse file tree 4 files changed +43
-2
lines changed Original file line number Diff line number Diff line change @@ -12329,6 +12329,9 @@ export default (foo) => {
12329
12329
/** @file To learn more,
12330
12330
* see: https://github.com/d3/d3-ease. */
12331
12331
12332
+ /** To learn more,
12333
+ * see: https://github.com/d3/d3-ease. */
12334
+
12332
12335
/**
12333
12336
* This is a complete sentence...
12334
12337
*/
@@ -23488,6 +23491,15 @@ function processSass (input) {
23488
23491
function updateIconButton () {
23489
23492
}
23490
23493
// "jsdoc/tag-lines": ["error"|"warn", "never",{"startLines":1}]
23494
+
23495
+ /** A class. */
23496
+ class _Foo {
23497
+ /** @param arg Argument. */
23498
+ conststructor(arg: string) {
23499
+ console.log(arg);
23500
+ }
23501
+ }
23502
+ // "jsdoc/tag-lines": ["error"|"warn", "any",{"startLines":1}]
23491
23503
````
23492
23504
23493
23505
Original file line number Diff line number Diff line change @@ -229,23 +229,28 @@ const getUtils = (
229
229
utils . getDescription = ( ) => {
230
230
const descriptions = [ ] ;
231
231
let lastDescriptionLine = 0 ;
232
+ let tagsBegun = false ;
232
233
jsdoc . source . some ( ( {
233
234
tokens : {
234
235
description,
235
236
tag,
236
237
end,
237
238
} ,
238
239
} , idx ) => {
240
+ if ( tag ) {
241
+ tagsBegun = true ;
242
+ }
243
+
239
244
if ( idx && ( tag || end ) ) {
240
245
lastDescriptionLine = idx - 1 ;
241
- if ( ! tag && description ) {
246
+ if ( ! tagsBegun && description ) {
242
247
descriptions . push ( description ) ;
243
248
}
244
249
245
250
return true ;
246
251
}
247
252
248
- if ( idx || description ) {
253
+ if ( ! tagsBegun && ( idx || description ) ) {
249
254
descriptions . push ( description || ( descriptions . length ? '' : '\n' ) ) ;
250
255
}
251
256
Original file line number Diff line number Diff line change @@ -1486,6 +1486,12 @@ export default {
1486
1486
* see: https://github.com/d3/d3-ease. */
1487
1487
` ,
1488
1488
} ,
1489
+ {
1490
+ code : `
1491
+ /** To learn more,
1492
+ * see: https://github.com/d3/d3-ease. */
1493
+ ` ,
1494
+ } ,
1489
1495
{
1490
1496
code : `
1491
1497
/**
Original file line number Diff line number Diff line change @@ -1139,5 +1139,23 @@ export default {
1139
1139
} ,
1140
1140
] ,
1141
1141
} ,
1142
+ {
1143
+ code : `
1144
+ /** A class. */
1145
+ class _Foo {
1146
+ /** @param arg Argument. */
1147
+ conststructor(arg: string) {
1148
+ console.log(arg);
1149
+ }
1150
+ }
1151
+ ` ,
1152
+ options : [
1153
+ 'any' ,
1154
+ {
1155
+ startLines : 1 ,
1156
+ } ,
1157
+ ] ,
1158
+ parser : require . resolve ( '@typescript-eslint/parser' ) ,
1159
+ } ,
1142
1160
] ,
1143
1161
} ;
You can’t perform that action at this time.
0 commit comments