{"id":26244,"library":"remark-lint-no-duplicate-defined-urls","title":"remark-lint-no-duplicate-defined-urls","description":"A remark-lint rule that warns when the same URL is defined multiple times in Markdown definitions. Current stable version is 3.0.1. It is part of the remark-lint ecosystem, focusing on detecting duplicate URLs to prevent mistakes. Unlike other lint rules that check for unused definitions, this targets duplicate URLs. It is ESM-only and requires Node.js 16+. Released as part of the remark-lint monorepo with regular updates.","status":"active","version":"3.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","definition","duplicate","lint","remark","remark-lint","remark-lint-rule","rule","url","typescript"],"install":[{"cmd":"npm install remark-lint-no-duplicate-defined-urls","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-no-duplicate-defined-urls","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-no-duplicate-defined-urls","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"required peer dependency to provide the linting framework","package":"remark-lint","optional":false}],"imports":[{"note":"Package is ESM-only since v3. CommonJS require will fail.","wrong":"const remarkLintNoDuplicateDefinedUrls = require('remark-lint-no-duplicate-defined-urls')","symbol":"remarkLintNoDuplicateDefinedUrls","correct":"import remarkLintNoDuplicateDefinedUrls from 'remark-lint-no-duplicate-defined-urls'"},{"note":"The package exports a default function, not a named export.","wrong":"import { remarkLintNoDuplicateDefinedUrls } from 'remark-lint-no-duplicate-defined-urls'","symbol":"default export","correct":"import remarkLintNoDuplicateDefinedUrls from 'remark-lint-no-duplicate-defined-urls'"},{"note":"Package does not export additional TypeScript types; use unified types if needed.","wrong":"","symbol":"type import","correct":"import type { Transformer } from 'unified'"}],"quickstart":{"code":"import remarkLint from 'remark-lint'\nimport remarkLintNoDuplicateDefinedUrls from 'remark-lint-no-duplicate-defined-urls'\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(remarkLintNoDuplicateDefinedUrls)\n  .use(remarkStringify)\n  .process(file)\n\nconsole.error(reporter(file))","lang":"typescript","description":"Set up remark-lint with the no-duplicate-defined-urls rule, parse a Markdown file, and report any lint messages."},"warnings":[{"fix":"Use import syntax instead of require().","message":"Package is ESM-only since v3. CommonJS require will fail.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Upgrade Node.js to v16 or later.","message":"Support for Node.js versions below 16 is dropped as of v3.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Use default import: import remarkLintNoDuplicateDefinedUrls from 'remark-lint-no-duplicate-defined-urls'","message":"The package is a default export, not a named export. Using named import will result in undefined.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure .use(remarkLint) is called before this rule.","message":"This rule must be used with remark-lint; it will not work if remark-lint is not in the plugin chain.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Change to import statement or use dynamic import().","cause":"Using CommonJS require() to load an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/remark-lint-no-duplicate-defined-urls/index.js not supported."},{"fix":"Remove or rename one of the duplicate definitions.","cause":"Two definitions in the Markdown file point to the same URL.","error":"Unexpected definition with an already defined URL (as `mercury`), expected unique URLs"},{"fix":"Remove curly braces: import remarkLintNoDuplicateDefinedUrls from ...","cause":"Using named import { remarkLintNoDuplicateDefinedUrls } instead of default import.","error":"TypeError: remarkLintNoDuplicateDefinedUrls is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}