Generate Rules.md and md###.md files from metadata, improve Parameters documentation by referencing schema.

This commit is contained in:
David Anson 2022-10-29 23:21:45 -07:00
parent 32c75ebfd9
commit 37baddcf27
110 changed files with 3875 additions and 179 deletions

38
doc/md053.md Normal file
View file

@ -0,0 +1,38 @@
# MD053 - Link and image reference definitions should be needed
Tags: images, links
Aliases: link-image-reference-definitions
Parameters:
* `ignored_definitions`: Ignored definitions (`string[]`, default `["//"]`)
Fixable: Most violations can be fixed by tooling
Links and images in Markdown can provide the link destination or image source
at the time of use or can define it elsewhere and use a label for reference.
The reference format is convenient for keeping paragraph text clutter-free
and makes it easy to reuse the same URL in multiple places.
Because link and image reference definitions are located separately from
where they are used, there are two scenarios where a definition can be
unnecessary:
1. If a label is not referenced by any link or image in a document, that
definition is unused and can be deleted.
1. If a label is defined multiple times in a document, the first definition is
used and the others can be deleted.
This rule considers a reference definition to be used if any link or image
reference has the corresponding label. The "full", "collapsed", and "shortcut"
formats are all supported.
If there are reference definitions that are deliberately unreferenced, they can
be ignored by setting the `ignored_definitions` parameter. The default value of
this parameter ignores the following convention for adding non-HTML comments to
Markdown:
```md
[//]: # (This behaves like a comment)
```