Skip to content

Commit

Permalink
Update based on db8129d db8129d
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 7, 2024
1 parent 6837d85 commit 5bff1e7
Show file tree
Hide file tree
Showing 3 changed files with 238 additions and 234 deletions.
460 changes: 230 additions & 230 deletions index.js

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions warning-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,23 @@ This rule is the sidebar counterpart of [broken link](#broken-link). Broken link

## Code with space

This rule checks for `<a>` whose sole child is `<code>` whose text content contains a space. This is usually an error, such as using `domxref` to reference an API, but forgetting to remove code formatting (e.g. `\{{domxref("Fetch_API", "Fetch API")}}`). Code formatting should only be used when indicating code entities, but linkable code rarely contains spaces (unless it's demonstrating a function call, for example).
This rule checks for `<a>` whose sole child is `<code>` whose text content contains a space. This is usually an error, such as using `domxref` to reference an API, but forgetting to remove code formatting (e.g. `{ {domxref("Fetch_API", "Fetch API")}}`). Code formatting should only be used when indicating code entities, but linkable code rarely contains spaces (unless it's demonstrating a function call, for example).

We have a wealth of exempted patterns and specific texts to filter out false positives. If false positives occur, consider adding them to [`create-graph.ts`](https://github.com/jc-verse/mdn-graph/blob/master/src/server/create-graph.ts) (for generalizable patterns) or [`allowed-code-link-text.txt`](https://github.com/jc-verse/mdn-graph/blob/master/config/allowed-code-link-text.txt) (for specific texts).

To fix these errors, the recommended way is to refactor it into a Markdown link (`[Fetch API](/en-US/docs/Web/API/Fetch_API)`), or, for the macros that support nocode-formatting, you can also pass the `"nocode"` parameter.

## Code with underscore

This is the underscore counterpart of [code with space](#code-with-space) and could arise from usage of macros such as `\{{domxref("Fetch_API")}}`. We also have exceptions encoded in `create-graph.ts` and `allowed-code-link-text.txt`.
This is the underscore counterpart of [code with space](#code-with-space) and could arise from usage of macros such as `{ {domxref("Fetch_API")}}`. We also have exceptions encoded in `create-graph.ts` and `allowed-code-link-text.txt`.

## Duplicate ID

This rule reports identical `id`s on the same page. Unless the content is hand-writing `id`, this is nearly always a Yari bug/limitation.

## Duplicate specifications

This rule reports multiple `\{{Specifications}}` macros on the same page. This is generally a content bug.
This rule reports multiple `{ {Specifications}}` macros on the same page. This is generally a content bug.

## External sandbox link

Expand All @@ -124,6 +124,10 @@ This rule reports `http:` links. It would be mentioned if the `https:` equivalen

This rule reports internal image links (ending in one of the image extensions). It's generally a bad idea to provide links to them rather than directly displaying them and could be a typo. You don't need to wrap images in another `<a>`.

## Missing data

Yari does not generate flaws for `{ {CSSSyntax}}` and `{ {CSSInfo}}` that are missing data. See [mdn/yari#8436](https://github.com/mdn/yari/issues/8436) and [mdn/yari#4487](https://github.com/mdn/yari/pull/4487).

## Missing sidebar

This rule reports pages without a sidebar. All pages should be associated with a sidebar.
Expand Down
2 changes: 1 addition & 1 deletion warnings.js

Large diffs are not rendered by default.

0 comments on commit 5bff1e7

Please sign in to comment.