mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Update new rule MD059/descriptive-link-text for project-level consistency.
This commit is contained in:
parent
b8374ec5d2
commit
571c2353ea
23 changed files with 466 additions and 383 deletions
|
|
@ -1,35 +1,13 @@
|
|||
# Descriptive link text empty config
|
||||
|
||||
[Learn about Javascript](https://example.com/javascript/about)
|
||||
|
||||
[About Javascript](https://example.com/file.txt)
|
||||
|
||||
Learn about [our mission](https://example.com/mission).
|
||||
|
||||
Go [here](https://example.com/descriptive-links)
|
||||
# Descriptive Link Text Empty Config
|
||||
|
||||
[Learn more](https://example.com/images/about) about us.
|
||||
|
||||
[Click here](https://example.com/dir/file.txt).
|
||||
|
||||
[read more](https://example.com/guide).
|
||||
|
||||
To get more support, go [here!](https://example.com/contact).
|
||||
|
||||
Learn [more.](https://example.com/contact).
|
||||
|
||||
To learn about our company, [click here!!!!](https://example.com/about).
|
||||
|
||||
[click-here!!!!](https://example.com/first).
|
||||
|
||||
Go to this [link]((https://example.com/second)).
|
||||
|
||||
[link][url]
|
||||
|
||||
[url]: https://example.com
|
||||
Go to this [link](https://example.com/second).
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"descriptive-link-text": {
|
||||
"link_texts": []
|
||||
"prohibited_texts": []
|
||||
}
|
||||
} -->
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Descriptive link text override
|
||||
# Descriptive Link Text Override
|
||||
|
||||
[Go here](https://example.com/javascript/about) {MD059}
|
||||
|
||||
|
|
@ -18,6 +18,6 @@ If you need additional guidance, read [this](https://example.com/links). {MD059}
|
|||
|
||||
<!-- markdownlint-configure-file {
|
||||
"descriptive-link-text": {
|
||||
"link_texts": ["go here", "this"]
|
||||
"prohibited_texts": [ "go here", "THIS" ]
|
||||
}
|
||||
} -->
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Descriptive link text
|
||||
# Descriptive Link Text
|
||||
|
||||
[Learn about Javascript](https://example.com/javascript/about)
|
||||
|
||||
|
|
@ -8,11 +8,11 @@ Learn about [our mission](https://example.com/mission).
|
|||
|
||||
Go [here](https://example.com/descriptive-links) {MD059}
|
||||
|
||||
[Learn more](https://example.com/images/about) about us. {MD059}
|
||||
[Learn more](https://example.com/images/about) about us.
|
||||
|
||||
[Click here](https://example.com/dir/file.txt). {MD059}
|
||||
|
||||
[read more](https://example.com/guide). {MD059}
|
||||
[Read more](https://example.com/guide).
|
||||
|
||||
To get more support, go [here!](https://example.com/contact). {MD059}
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ To learn more, [click here!!!!](https://example.com/about). {MD059}
|
|||
|
||||
[click-here!!!!](https://example.com/first). {MD059}
|
||||
|
||||
Go to this [link]((https://example.com/second)). {MD059}
|
||||
Go to this [link](https://example.com/second). {MD059}
|
||||
|
||||
[link][Example URL] {MD059}
|
||||
|
||||
|
|
@ -30,3 +30,10 @@ Go to this [link]((https://example.com/second)). {MD059}
|
|||
|
||||
{MD059} [click
|
||||
here](https://example.com)
|
||||
|
||||
[link](destination) {MD059}
|
||||
[*link*](destination) {MD059}
|
||||
[_link_](destination) {MD049} {MD059}
|
||||
[~~link~~](destination) {MD059}
|
||||
[`link`](destination)
|
||||
[<link>](destination) {MD033}
|
||||
|
|
|
|||
|
|
@ -907,7 +907,7 @@ test("readme", async(t) => {
|
|||
});
|
||||
|
||||
test("validateJsonUsingConfigSchemaStrict", async(t) => {
|
||||
t.plan(187);
|
||||
t.plan(186);
|
||||
// @ts-ignore
|
||||
const ajv = new Ajv(ajvOptions);
|
||||
const validateSchemaStrict = ajv.compile(configSchemaStrict);
|
||||
|
|
|
|||
|
|
@ -8,12 +8,10 @@ Generated by [AVA](https://avajs.dev).
|
|||
|
||||
> Expected linting violations
|
||||
|
||||
`test-repos/mdn-content/files/en-us/glossary/media_query/index.md: 11: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`<link>\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/learn_web_development/core/css_layout/fundamental_layout_comprehension/index.md: 15: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
`test-repos/mdn-content/files/en-us/learn_web_development/core/css_layout/fundamental_layout_comprehension/index.md: 15: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
test-repos/mdn-content/files/en-us/learn_web_development/core/scripting/functions/index.md: 90: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
test-repos/mdn-content/files/en-us/learn_web_development/core/structuring_content/creating_links/index.md: 255: MD059/descriptive-link-text Link text should be descriptive [Context: "[Click here]"]␊
|
||||
test-repos/mdn-content/files/en-us/learn_web_development/core/styling_basics/box_model/index.md: 293: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
test-repos/mdn-content/files/en-us/learn_web_development/extensions/performance/css/index.md: 174: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`<link>\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/learn_web_development/extensions/performance/multimedia/index.md: 105: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
test-repos/mdn-content/files/en-us/learn_web_development/extensions/server-side/django/development_environment/index.md: 225: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
test-repos/mdn-content/files/en-us/learn_web_development/extensions/server-side/django/development_environment/index.md: 464: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
|
|
@ -33,38 +31,17 @@ Generated by [AVA](https://avajs.dev).
|
|||
test-repos/mdn-content/files/en-us/mozilla/firefox/releases/29/index.md: 29: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
test-repos/mdn-content/files/en-us/mozilla/firefox/releases/3/updating_extensions/index.md: 162: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
test-repos/mdn-content/files/en-us/mozilla/firefox/releases/44/index.md: 218: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/accessibility/aria/aria_techniques/index.md: 18: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`link\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/accessibility/aria/attributes/aria-disabled/index.md: 115: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`link\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/accessibility/aria/attributes/aria-expanded/index.md: 99: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`link\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/accessibility/aria/attributes/aria-haspopup/index.md: 65: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`link\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/accessibility/aria/roles/command_role/index.md: 17: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`link\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/accessibility/aria/roles/index.md: 88: MD059/descriptive-link-text Link text should be descriptive [Context: "[link]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/api/background_fetch_api/index.md: 89: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/api/filesystem/index.md: 12: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/api/html_drag_and_drop_api/index.md: 243: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/api/htmlanchorelement/index.md: 10: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`<link>\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/api/htmllinkelement/as/index.md: 17: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`<link>\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/api/htmllinkelement/index.md: 10: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`<link>\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/api/media_source_extensions_api/transcoding_assets_for_mse/index.md: 28: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/api/stylesheet/ownernode/index.md: 16: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`<link>\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/api/svgaelement/target/index.md: 19: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/api/webglrenderingcontext/getextension/index.md: 46: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/api/webglrenderingcontext/getsupportedextensions/index.md: 44: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/css/_colon_any-link/index.md: 66: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`:link\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/css/_colon_visited/index.md: 14: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`:link\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/css/_colon_visited/index.md: 24: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`<link>\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/css/css_media_queries/index.md: 131: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`<link>\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/css/css_media_queries/index.md: 132: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`<link>\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/css/justify-items/index.md: 18: MD059/descriptive-link-text Link text should be descriptive [Context: "[more]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/css/justify-items/index.md: 19: MD059/descriptive-link-text Link text should be descriptive [Context: "[more]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/css/justify-items/index.md: 20: MD059/descriptive-link-text Link text should be descriptive [Context: "[more]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/html/attributes/rel/preconnect/index.md: 22: MD059/descriptive-link-text Link text should be descriptive [Context: "[Link]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/html/attributes/rel/preload/index.md: 105: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`<link>\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/http/headers/sec-purpose/index.md: 15: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`<link>\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/http/headers/sec-purpose/index.md: 16: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`<link>\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/http/headers/sec-purpose/index.md: 54: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`<link>\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/http/headers/sec-purpose/index.md: 92: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`<link>\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/javascript/guide/modules/index.md: 407: MD059/descriptive-link-text Link text should be descriptive [Context: "[\`<link>\`]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/performance/dns-prefetch/index.md: 74: MD059/descriptive-link-text Link text should be descriptive [Context: "[\\<link>]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/performance/speculative_loading/index.md: 50: MD059/descriptive-link-text Link text should be descriptive [Context: "[Link]"]␊
|
||||
test-repos/mdn-content/files/en-us/web/performance/speculative_loading/index.md: 90: MD059/descriptive-link-text Link text should be descriptive [Context: "[Link]"]␊
|
||||
|
|
|
|||
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
|
@ -70,8 +70,6 @@ text and ``\`code with ignored escaped \` backticks``
|
|||
|
||||
`` ` leading and trailing space allowed for backtick ` `` text `code`
|
||||
|
||||
<!-- markdownlint-disable descriptive-link-text -->
|
||||
|
||||
Text [link](https://example.com/link`link) text `code`.
|
||||
|
||||
Text [link](https://example.com/link```link) text ```code```.
|
||||
|
|
@ -171,3 +169,5 @@ Text
|
|||
Code
|
||||
```
|
||||
Text
|
||||
|
||||
<!-- markdownlint-disable-file descriptive-link-text -->
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
# Heading
|
||||
|
||||
<!-- markdownlint-disable-file descriptive-link-text emphasis-style line-length strong-style -->
|
||||
|
||||
Line with *Normal emphasis*
|
||||
|
||||
Line with **Normal strong**
|
||||
|
|
@ -389,9 +391,3 @@ Emphasis <p data="* attribute *">* HTML *</p> {MD033} {MD037}
|
|||
|
||||
Embedded underscore is okay:
|
||||
Text _emphas_i_s_ text _emphasis_
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"emphasis-style": false,
|
||||
"descriptive-link-text": false,
|
||||
"strong-style": false
|
||||
} -->
|
||||
|
|
|
|||
|
|
@ -38,6 +38,6 @@ code
|
|||
|
||||
<!-- markdownlint-configure-file {
|
||||
"code-block-style": false,
|
||||
"heading-style": false,
|
||||
"descriptive-link-text": false
|
||||
"descriptive-link-text": false,
|
||||
"heading-style": false
|
||||
} -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue