@@ -3,7 +3,7 @@ import * as Util from "util";
33import type { Reflection } from "../../models/reflections/abstract" ;
44import { Component , ContextAwareRendererComponent } from "../components" ;
55import { MarkdownEvent , RendererEvent } from "../events" ;
6- import { BindOption } from "../../utils" ;
6+ import { BindOption , ValidationOptions } from "../../utils" ;
77
88/**
99 * A plugin that builds links in markdown texts.
@@ -24,6 +24,9 @@ export class MarkedLinksPlugin extends ContextAwareRendererComponent {
2424 @BindOption ( "listInvalidSymbolLinks" )
2525 listInvalidSymbolLinks ! : boolean ;
2626
27+ @BindOption ( "validation" )
28+ validation ! : ValidationOptions ;
29+
2730 private warnings : string [ ] = [ ] ;
2831
2932 /**
@@ -165,7 +168,15 @@ export class MarkedLinksPlugin extends ContextAwareRendererComponent {
165168 * Triggered when {@link Renderer} is finished
166169 */
167170 onEndRenderer ( _event : RendererEvent ) {
168- if ( this . listInvalidSymbolLinks && this . warnings . length > 0 ) {
171+ const enabled =
172+ this . listInvalidSymbolLinks || this . validation . invalidLink ;
173+ if ( this . listInvalidSymbolLinks ) {
174+ this . application . logger . warn (
175+ "listInvalidSymbolLinks is deprecated and will be removed in 0.23, set validation.invalidLink instead."
176+ ) ;
177+ }
178+
179+ if ( enabled && this . warnings . length > 0 ) {
169180 this . application . logger . warn (
170181 "\n[MarkedLinksPlugin]: Found invalid symbol reference(s) in JSDocs, " +
171182 "they will not render as links in the generated documentation." +
0 commit comments