@@ -14,7 +14,7 @@ if (moduleRootAbsolute && !fs.existsSync(moduleRootAbsolute)) {
1414 throw new Error (
1515 'Directory "' +
1616 moduleRootAbsolute +
17- '" does not exist. Check the "typescript.moduleRoot" config option for jsdoc-plugin-typescript'
17+ '" does not exist. Check the "typescript.moduleRoot" config option for jsdoc-plugin-typescript' ,
1818 ) ;
1919}
2020
@@ -236,7 +236,7 @@ exports.defineTags = function (dictionary) {
236236 }
237237 throw new Error ( "Missing closing '}'" ) ;
238238 } ;
239- }
239+ } ,
240240 ) ;
241241} ;
242242
@@ -327,10 +327,10 @@ exports.astNodeVisitor = {
327327 if (
328328 leadingComments . length === 0 ||
329329 ( leadingComments [ leadingComments . length - 1 ] . value . indexOf (
330- '@classdesc'
330+ '@classdesc' ,
331331 ) === - 1 &&
332332 noClassdescRegEx . test (
333- leadingComments [ leadingComments . length - 1 ] . value
333+ leadingComments [ leadingComments . length - 1 ] . value ,
334334 ) )
335335 ) {
336336 // Create a suitable comment node if we don't have one on the class yet
@@ -348,7 +348,7 @@ exports.astNodeVisitor = {
348348 if ( node . superClass ) {
349349 // Remove the `@extends` tag because JSDoc does not does not handle generic type. (`@extends {Base<Type>}`)
350350 const extendsIndex = lines . findIndex ( ( line ) =>
351- line . includes ( '@extends' )
351+ line . includes ( '@extends' ) ,
352352 ) ;
353353 if ( extendsIndex !== - 1 ) {
354354 lines . splice ( extendsIndex , 1 ) ;
@@ -360,7 +360,7 @@ exports.astNodeVisitor = {
360360 if ( identifier ) {
361361 const absolutePath = getResolvedPath (
362362 path . dirname ( currentSourceName ) ,
363- ensureJsExt ( identifier . value )
363+ ensureJsExt ( identifier . value ) ,
364364 ) ;
365365 const moduleInfo = getModuleInfo ( absolutePath , parser ) ;
366366
@@ -392,7 +392,7 @@ exports.astNodeVisitor = {
392392 // Replace typeof Foo with Class<Foo>
393393 comment . value = comment . value . replace (
394394 / t y p e o f ( [ ^ , \| \} \> ] * ) ( [ , \| \} \> ] ) / g,
395- 'Class<$1>$2'
395+ 'Class<$1>$2' ,
396396 ) ;
397397
398398 // Remove `@override` annotations to avoid JSDoc breaking the inheritance chain
@@ -420,7 +420,7 @@ exports.astNodeVisitor = {
420420 if ( replaceAttempt > 100 ) {
421421 // infinite loop protection
422422 throw new Error (
423- `Invalid docstring ${ comment . value } in ${ currentSourceName } .`
423+ `Invalid docstring ${ comment . value } in ${ currentSourceName } .` ,
424424 ) ;
425425 }
426426 } else {
@@ -430,7 +430,7 @@ exports.astNodeVisitor = {
430430
431431 const rel = getResolvedPath (
432432 path . dirname ( currentSourceName ) ,
433- ensureJsExt ( importSource )
433+ ensureJsExt ( importSource ) ,
434434 ) ;
435435 const moduleInfo = getModuleInfo ( rel , parser ) ;
436436
@@ -445,14 +445,14 @@ exports.astNodeVisitor = {
445445
446446 replacement = `module:${ moduleInfo . id . replace (
447447 slashRegEx ,
448- '/'
448+ '/' ,
449449 ) } ${ name ? delimiter + name : '' } `;
450450 }
451451 }
452452 if ( replacement ) {
453453 comment . value = comment . value . replace (
454454 importExpression ,
455- replacement + remainder
455+ replacement + remainder ,
456456 ) ;
457457 }
458458 }
@@ -473,13 +473,13 @@ exports.astNodeVisitor = {
473473 Object . keys ( identifiers ) . forEach ( ( key ) => {
474474 const eventRegex = new RegExp (
475475 `@(event |fires )${ key } ([^A-Za-z])` ,
476- 'g'
476+ 'g' ,
477477 ) ;
478478 replace ( eventRegex ) ;
479479
480480 const typeRegex = new RegExp (
481481 `@(.*[{<|,(!?:]\\s*)${ key } ([^A-Za-z].*?\}|\})` ,
482- 'g'
482+ 'g' ,
483483 ) ;
484484 replace ( typeRegex ) ;
485485
@@ -488,7 +488,7 @@ exports.astNodeVisitor = {
488488 const identifier = identifiers [ key ] ;
489489 const absolutePath = getResolvedPath (
490490 path . dirname ( currentSourceName ) ,
491- ensureJsExt ( identifier . value )
491+ ensureJsExt ( identifier . value ) ,
492492 ) ;
493493 const moduleInfo = getModuleInfo ( absolutePath , parser ) ;
494494
@@ -503,12 +503,12 @@ exports.astNodeVisitor = {
503503
504504 const replacement = `module:${ moduleInfo . id . replace (
505505 slashRegEx ,
506- '/'
506+ '/' ,
507507 ) } ${ exportName ? delimiter + exportName : '' } `;
508508
509509 comment . value = comment . value . replace (
510510 regex ,
511- '@$1' + replacement + '$2'
511+ '@$1' + replacement + '$2' ,
512512 ) ;
513513 }
514514 }
0 commit comments