{"name":"remark-lint-no-unused-definitions","version":"3.1.1","description":"remark-lint rule to warn when unused definitions are found","license":"MIT","keywords":["remark","lint","rule","remark-lint-rule","definition"],"repository":{"type":"git","url":"git+https://github.com/remarkjs/remark-lint.git","directory":"packages/remark-lint-no-unused-definitions"},"bugs":{"url":"https://github.com/remarkjs/remark-lint/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"@types/mdast":"^3.0.0","unified":"^10.0.0","unified-lint-rule":"^2.0.0","unist-util-generated":"^2.0.0","unist-util-visit":"^4.0.0"},"scripts":{"build":"rimraf \"*.d.ts\" && tsc && type-coverage"},"xo":false,"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"5269b64da47b82874c317f83e1e0f4cbead91785","homepage":"https://github.com/remarkjs/remark-lint#readme","_id":"remark-lint-no-unused-definitions@3.1.1","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"integrity":"sha512-/GtyBukhAxi5MEX/g/m+FzDEflSbTe2/cpe2H+tJZyDmiLhjGXRdwWnPRDp+mB9g1iIZgVRCk7T4v90RbQX/mw==","shasum":"584fcd0b1ad569d3e1933256e85b9fb308e88695","tarball":"http://registry-npm.ywwl.com/remark-lint-no-unused-definitions/download/remark-lint-no-unused-definitions-3.1.1.tgz","fileCount":4,"unpackedSize":9469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqeJrCRA9TVsSAnZWagAAo3QP/RT/2tqZFvC+OGJI3iRS\nPowPGNImXSJ/2VL9st61Z5x2ArvIuWmcuID/AD+BYTJOR1I2BYlIjp1pGybZ\nNuGMlkPNFNfEJJf0W0NyCjPQTrLIY9bJznp7Qxy9NzPDx3l8tPIfb5HKMPg7\n/w/US3pSoFN/9VmDbwt0Nma4DFiQgLtfrj5McLAkJo/LJ8qVyz3uU3ywCh2k\nNFCuLG7W/ctnryMqhOmQuotdp5UjK3o29l34wVgvX3j3JVSk5nw5T9K4fwmT\noh/qeDtS7QD4KJ0xugFxTdo37rLEUZteF8482RGgYpauBX3yl5S7YUHA0D7d\n1j7xxVmYrv5ha+4y3/mp2rE72zNwODu5Xrtba9P0PwTclYeE2f7ciRP1vLX3\nce2RJkh52hE10VL28II1G9PkxaD4/W1Ls09wDF/SmQIJyHYSDIpxbtTlVvYZ\nPtBes5ZmdSLxbcOcFwBmfwRV4F40SGb49WkG8no2JZX1cwE9Uk17DoniAzEn\nnu4z5MTia7TjZTPnkWpoKhMKfK4Jm5CUt/wVNG3ox+x9Pnr7Q+1ad9MCzpDm\nvqfY8BmQ0QkWU33BIvI4l74YMcHJvhqZoZDVWl+lASfEJcLlmZV7t9Gm5PyH\nRpFmxFYfS+HxL9WnNW1Lz9myUi+Hjek+dc/4ePkp1gFOWLTSsLVgYZqNtHsb\no8rb\r\n=0fmR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWeWVONYUm4H0mEbdF/dwwo0Dv+z2ypEWQjrbrLGjT8QIgWiNx50LT03603JoHMjoCslm14SnouXVxTMOuhbUaWzA="}],"size":3291,"noattachment":false,"key":"/remark-lint-no-unused-definitions/-/remark-lint-no-unused-definitions-3.1.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"johno","email":"johnotander@gmail.com"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remark-lint-no-unused-definitions_3.1.1_1638523499520_0.08299859032270374"},"_hasShrinkwrap":false,"readme":"<!--This file is generated-->\n\n# remark-lint-no-unused-definitions\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 unreferenced definitions 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(remarkLintNoUnusedDefinitions)`](#unifieduseremarklintnounuseddefinitions)\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 definitions are referenced.\n\n## When should I use this?\n\nYou can use this package to check definitions.\n\n## Presets\n\nThis plugin is included in the following presets:\n\n| Preset | Options |\n| - | - |\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-unused-definitions\n```\n\nIn Deno with [`esm.sh`][esm-sh]:\n\n```js\nimport remarkLintNoUnusedDefinitions from 'https://esm.sh/remark-lint-no-unused-definitions@4'\n```\n\nIn browsers with [`esm.sh`][esm-sh]:\n\n```html\n<script type=\"module\">\n  import remarkLintNoUnusedDefinitions from 'https://esm.sh/remark-lint-no-unused-definitions@4?bundle'\n</script>\n```\n\n## Use\n\nOn the API:\n\n```js\nimport remarkLint from 'remark-lint'\nimport remarkLintNoUnusedDefinitions from 'remark-lint-no-unused-definitions'\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(remarkLintNoUnusedDefinitions)\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-unused-definitions .\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-unused-definitions\",\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[`remarkLintNoUnusedDefinitions`][api-remark-lint-no-unused-definitions].\n\n### `unified().use(remarkLintNoUnusedDefinitions)`\n\nWarn when unreferenced definitions 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\nUnused definitions do not contribute anything, so they can be removed.\n\n## Examples\n\n##### `ok.md`\n\n###### In\n\n```markdown\n[Mercury][]\n\n[mercury]: https://example.com/mercury/\n```\n\n###### Out\n\nNo messages.\n\n##### `not-ok.md`\n\n###### In\n\n```markdown\n[mercury]: https://example.com/mercury/\n```\n\n###### Out\n\n```text\n1:1-1:40: Unexpected unused definition, expected no definition or one or more references to `mercury`\n```\n\n##### `gfm.md`\n\n###### In\n\n> 👉 **Note**: this example uses\n> GFM ([`remark-gfm`][github-remark-gfm]).\n\n```markdown\nMercury[^mercury] is a planet.\n\n[^Mercury]:\n    **Mercury** is the first planet from the Sun and the smallest\n    in the Solar System.\n[^Venus]:\n    **Venus** is the second planet from\n    the Sun.\n```\n\n###### Out\n\n```text\n6:1-8:13: Unexpected unused footnote definition, expected no definition or one or more footnote references to `venus`\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-unused-definitions@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-unused-definitions]: #unifieduseremarklintnounuseddefinitions\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-unused-definitions.svg\n\n[badge-downloads-url]: https://www.npmjs.com/package/remark-lint-no-unused-definitions\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-unused-definitions\n\n[badge-size-url]: https://bundlejs.com/?q=remark-lint-no-unused-definitions\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-gfm]: https://github.com/remarkjs/remark-gfm\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":1638523499673,"_cnpm_publish_time":1638523499673,"dist-tags":{"latest":"4.0.2"}}