{"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"bugs":{"url":"https://github.com/remarkjs/remark-lint/issues"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com"}],"dependencies":{"@types/mdast":"^4.0.0","unified-lint-rule":"^3.0.0","unist-util-visit-parents":"^6.0.0"},"description":"remark-lint rule to warn when shortcut reference images are used","exports":"./index.js","funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"keywords":["image","lint","reference","remark","remark-lint","remark-lint-rule","rule","shortcut"],"license":"MIT","name":"remark-lint-no-shortcut-reference-image","repository":{"type":"git","url":"git+https://github.com/remarkjs/remark-lint.git#main"},"scripts":{},"sideEffects":false,"typeCoverage":{"atLeast":100,"strict":true},"type":"module","version":"4.0.1","xo":{"prettier":true,"rules":{"capitalized-comments":"off"}},"_id":"remark-lint-no-shortcut-reference-image@4.0.1","gitHead":"46ccbcd49deaada0172ad10425a2cd6b5f21a2c2","types":"./index.d.ts","homepage":"https://github.com/remarkjs/remark-lint/tree/main#readme","_nodeVersion":"23.1.0","_npmVersion":"11.0.0","dist":{"integrity":"sha512-hQhJ3Dr8ZWRdj7qm6+9vcPpqtGchhENA2UHOmcTraLf6dN1cFATCgY/HbTbRIN6NkG/EEClTgRC1QCokWR2Mmw==","shasum":"98e92ac300c9ed5374b026d2550849c1709878ca","tarball":"http://registry-npm.ywwl.com/remark-lint-no-shortcut-reference-image/download/remark-lint-no-shortcut-reference-image-4.0.1.tgz","fileCount":5,"unpackedSize":10614,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHCz/JZ4MjeCeLuIAGO0vpxtp5dxq+XL/Ed7+puDrOlbAiEArOLkI/WBlX8LR2LxG67NGwE9UOJQ8bpwJqNp/RyYngA="}],"size":3358,"noattachment":false,"key":"/remark-lint-no-shortcut-reference-image/-/remark-lint-no-shortcut-reference-image-4.0.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"johno","email":"johnotander@gmail.com"},{"name":"wooorm","email":"tituswormer@gmail.com"},{"name":"remcohaszing","email":"remcohaszing@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/remark-lint-no-shortcut-reference-image_4.0.1_1737981300072_0.6295161991425344"},"_hasShrinkwrap":false,"readme":"<!--This file is generated-->\n\n# remark-lint-no-shortcut-reference-image\n\n[![Build][badge-build-image]][badge-build-url]\n[![Coverage][badge-coverage-image]][badge-coverage-url]\n[![Downloads][badge-downloads-image]][badge-downloads-url]\n[![Size][badge-size-image]][badge-size-url]\n[![Sponsors][badge-funding-sponsors-image]][badge-funding-url]\n[![Backers][badge-funding-backers-image]][badge-funding-url]\n[![Chat][badge-chat-image]][badge-chat-url]\n\n[`remark-lint`][github-remark-lint] rule to warn when shortcut reference images are used.\n\n## Contents\n\n* [What is this?](#what-is-this)\n* [When should I use this?](#when-should-i-use-this)\n* [Presets](#presets)\n* [Install](#install)\n* [Use](#use)\n* [API](#api)\n  * [`unified().use(remarkLintNoShortcutReferenceImage)`](#unifieduseremarklintnoshortcutreferenceimage)\n* [Recommendation](#recommendation)\n* [Examples](#examples)\n* [Compatibility](#compatibility)\n* [Contribute](#contribute)\n* [License](#license)\n\n## What is this?\n\nThis package checks that collapsed or full reference images are used.\n\n## When should I use this?\n\nYou can use this package to check that references are consistent.\n\n## Presets\n\nThis plugin is included in the following presets:\n\n| Preset | Options |\n| - | - |\n| [`remark-preset-lint-markdown-style-guide`](https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-markdown-style-guide) | |\n| [`remark-preset-lint-recommended`](https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-recommended) | |\n\n## Install\n\nThis package is [ESM only][github-gist-esm].\nIn Node.js (version 16+),\ninstall with [npm][npm-install]:\n\n```sh\nnpm install remark-lint-no-shortcut-reference-image\n```\n\nIn Deno with [`esm.sh`][esm-sh]:\n\n```js\nimport remarkLintNoShortcutReferenceImage from 'https://esm.sh/remark-lint-no-shortcut-reference-image@4'\n```\n\nIn browsers with [`esm.sh`][esm-sh]:\n\n```html\n<script type=\"module\">\n  import remarkLintNoShortcutReferenceImage from 'https://esm.sh/remark-lint-no-shortcut-reference-image@4?bundle'\n</script>\n```\n\n## Use\n\nOn the API:\n\n```js\nimport remarkLint from 'remark-lint'\nimport remarkLintNoShortcutReferenceImage from 'remark-lint-no-shortcut-reference-image'\nimport remarkParse from 'remark-parse'\nimport remarkStringify from 'remark-stringify'\nimport {read} from 'to-vfile'\nimport {unified} from 'unified'\nimport {reporter} from 'vfile-reporter'\n\nconst file = await read('example.md')\n\nawait unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintNoShortcutReferenceImage)\n  .use(remarkStringify)\n  .process(file)\n\nconsole.error(reporter(file))\n```\n\nOn the CLI:\n\n```sh\nremark --frail --use remark-lint --use remark-lint-no-shortcut-reference-image .\n```\n\nOn the CLI in a config file (here a `package.json`):\n\n```diff\n …\n \"remarkConfig\": {\n   \"plugins\": [\n     …\n     \"remark-lint\",\n+    \"remark-lint-no-shortcut-reference-image\",\n     …\n   ]\n }\n …\n```\n\n## API\n\nThis package exports no identifiers.\nIt exports no additional [TypeScript][typescript] types.\nThe default export is\n[`remarkLintNoShortcutReferenceImage`][api-remark-lint-no-shortcut-reference-image].\n\n### `unified().use(remarkLintNoShortcutReferenceImage)`\n\nWarn when shortcut reference images are used.\n\n###### Parameters\n\nThere are no options.\n\n###### Returns\n\nTransform ([`Transformer` from `unified`][github-unified-transformer]).\n\n## Recommendation\n\nShortcut references use an implicit style that looks a lot like something\nthat could occur as plain text instead of syntax.\nIn some cases,\nplain text is intended instead of an image.\nSo it’s recommended to use collapsed or full references instead.\n\n## Examples\n\n##### `ok.md`\n\n###### In\n\n```markdown\n![Mercury][]\n\n[mercury]: /mercury.png\n```\n\n###### Out\n\nNo messages.\n\n##### `not-ok.md`\n\n###### In\n\n```markdown\n![Mercury]\n\n[mercury]: /mercury.png\n```\n\n###### Out\n\n```text\n1:1-1:11: Unexpected shortcut reference image (`![text]`), expected collapsed reference (`![text][]`)\n```\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line,\n`remark-lint-no-shortcut-reference-image@4`,\ncompatible with Node.js 16.\n\n## Contribute\n\nSee [`contributing.md`][github-dotfiles-contributing] in [`remarkjs/.github`][github-dotfiles-health] for ways\nto get started.\nSee [`support.md`][github-dotfiles-support] for ways to get help.\n\nThis project has a [code of conduct][github-dotfiles-coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][file-license] © [Titus Wormer][author]\n\n[api-remark-lint-no-shortcut-reference-image]: #unifieduseremarklintnoshortcutreferenceimage\n\n[author]: https://wooorm.com\n\n[badge-build-image]: https://github.com/remarkjs/remark-lint/workflows/main/badge.svg\n\n[badge-build-url]: https://github.com/remarkjs/remark-lint/actions\n\n[badge-chat-image]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[badge-chat-url]: https://github.com/remarkjs/remark/discussions\n\n[badge-coverage-image]: https://img.shields.io/codecov/c/github/remarkjs/remark-lint.svg\n\n[badge-coverage-url]: https://codecov.io/github/remarkjs/remark-lint\n\n[badge-downloads-image]: https://img.shields.io/npm/dm/remark-lint-no-shortcut-reference-image.svg\n\n[badge-downloads-url]: https://www.npmjs.com/package/remark-lint-no-shortcut-reference-image\n\n[badge-funding-backers-image]: https://opencollective.com/unified/backers/badge.svg\n\n[badge-funding-sponsors-image]: https://opencollective.com/unified/sponsors/badge.svg\n\n[badge-funding-url]: https://opencollective.com/unified\n\n[badge-size-image]: https://img.shields.io/bundlejs/size/remark-lint-no-shortcut-reference-image\n\n[badge-size-url]: https://bundlejs.com/?q=remark-lint-no-shortcut-reference-image\n\n[esm-sh]: https://esm.sh\n\n[file-license]: https://github.com/remarkjs/remark-lint/blob/main/license\n\n[github-dotfiles-coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md\n\n[github-dotfiles-contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md\n\n[github-dotfiles-health]: https://github.com/remarkjs/.github\n\n[github-dotfiles-support]: https://github.com/remarkjs/.github/blob/main/support.md\n\n[github-gist-esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[github-remark-lint]: https://github.com/remarkjs/remark-lint\n\n[github-unified-transformer]: https://github.com/unifiedjs/unified#transformer\n\n[npm-install]: https://docs.npmjs.com/cli/install\n\n[typescript]: https://www.typescriptlang.org\n","publish_time":1737981300378,"_cnpm_publish_time":1737981300378,"dist-tags":{"latest":"4.0.1"}}