{"library":"remark-lint-no-duplicate-definitions","title":"remark-lint-no-duplicate-definitions","description":"A remark-lint rule that warns when identifiers (footnotes, links, etc.) are defined multiple times in Markdown documents. Current stable version is 4.0.1 (ESM-only, requires Node.js 16+). Part of the remark-lint ecosystem, included in `remark-preset-lint-recommended`. It helps catch mistakes where the same identifier is used for different definitions, ensuring uniqueness. Unlike custom checks, this rule integrates seamlessly with remark's unified pipeline and provides clear, standardized error messages.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install remark-lint-no-duplicate-definitions"],"cli":null},"imports":["import remarkLintNoDuplicateDefinitions from 'remark-lint-no-duplicate-definitions'","const remarkLintNoDuplicateDefinitions = require('remark-lint-no-duplicate-definitions')","import remarkLintNoDuplicateDefinitions from 'remark-lint-no-duplicate-definitions' // types inferred"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { unified } from 'unified'\nimport remarkParse from 'remark-parse'\nimport remarkLint from 'remark-lint'\nimport remarkLintNoDuplicateDefinitions from 'remark-lint-no-duplicate-definitions'\nimport remarkStringify from 'remark-stringify'\nimport { reporter } from 'vfile-reporter'\n\nconst file = await unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintNoDuplicateDefinitions)\n  .use(remarkStringify)\n  .process('[mercury]: https://example.com/mercury/\\n[mercury]: https://example.com/venus/')\n\nconsole.error(reporter(file))","lang":"typescript","description":"Demonstrates how to use the rule to detect duplicate definitions. The input has two identical identifiers (mercury) and the output will show a warning.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}