Report broken links as data

linkValidationPlugin gained a report option. It still fails the build by default, but can now write dist/fumapress-diagnostics.json instead, so a CI check can annotate a pull request rather than parse an error message.

linkValidationPlugin({ report: "json" });

Use "both" to write the file and still fail the build. The file is written on every build, so an empty diagnostics array means validation ran and found nothing, rather than that it never ran.

Last updated on

On this page