The goal of this script is to provide a relatively quick way to check for outdated links and content within the codebase. If a file/url combo is listed in the output file, the idea is that it needs to be checked because the URL did not return a 200 status code.
I've added a new script that can be run via an npm script. The goal of this script is to check all links that begin with http or https located within our .md or .mdx files throughout the codebase. I've tried to exclude known directories that we don't want to dig through, like node_modules. If there are others that should be excluded, please let me know.
I'm currently writing to a .txt file. I'm meh about this and am not sure what format might be the easiest for folks to parse and work with when reviewing content. I'm also open to discussing the formatting of the content within the file, as that might not be the easiest to parse.
How to test
Run yarn lint:links
Confirm that the content brokenLinkReport.txt is overwritten with a series of filenames, urls and HTTP response codes.
Checklist
[X] Prefixed the PR title with the Jira ticket number as [WNMGDS-####] Title or [NO-TICKET] if this is unticketed work.
[X] Selected appropriate Type (only one) label for this PR, if it is a breaking change, label should only be Type: Breaking
[X] Selected appropriate Impacts, multiple can be selected.
Summary
Ticket
The goal of this script is to provide a relatively quick way to check for outdated links and content within the codebase. If a file/url combo is listed in the output file, the idea is that it needs to be checked because the URL did not return a 200 status code.
I've added a new script that can be run via an npm script. The goal of this script is to check all links that begin with
http
orhttps
located within our .md or .mdx files throughout the codebase. I've tried to exclude known directories that we don't want to dig through, like node_modules. If there are others that should be excluded, please let me know.I'm currently writing to a .txt file. I'm meh about this and am not sure what format might be the easiest for folks to parse and work with when reviewing content. I'm also open to discussing the formatting of the content within the file, as that might not be the easiest to parse.
How to test
yarn lint:links
brokenLinkReport.txt
is overwritten with a series of filenames, urls and HTTP response codes.Checklist
[WNMGDS-####] Title
or [NO-TICKET] if this is unticketed work.Type
(only one) label for this PR, if it is a breaking change, label should only beType: Breaking
Impacts
, multiple can be selected.Screenshot