fix(flaws): stop reporting absolute MDN blog links as broken #9080
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Problem
We have a flaw that reports absolute MDN links, to ensure content uses relative links, so that they work on all environments (locally, stage and prod), and another flaw that reports relative MDN links that don't exist.
When we added relative links to MDN blog articles, this has been causing a flaw, because external contributors don't have the mdn/mdn-studio repository checked out, and even if they would, the flaw doesn't take the blog articles into consideration.
That's why relative links to MDN blog articles were replaced with absolute links, but that caused the other flaw.
Solution
Do not consider absolute links to MDN blog articles broken.
Screenshots
Before
After
How did you test this change?
Ran
yarn && yarn dev
(withREACT_APP_WRITER_MODE=true
in my.env
) and opened http://localhost:3000/en-US/docs/Web/CSS/:not#_flaws locally.