{"id":26275,"library":"remark-lint-no-undefined-references","title":"remark-lint-no-undefined-references","description":"remark-lint rule to warn when Markdown references to undefined definitions are found. Current stable version: 5.0.2. Released as part of the remark-lint monorepo; patch updates follow release cadence of the monorepo. Differentiator: catches broken links in Markdown documents by ensuring all `[text][reference]` and `[text][]` references have a corresponding `[reference]: URL` definition. Supports options to allow shortcut references and custom allow-lists. Ships TypeScript types and is ESM-only from v5.","status":"active","version":"5.0.2","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","definition","lint","reference","remark","remark-lint","remark-lint-rule","rule","typescript"],"install":[{"cmd":"npm install remark-lint-no-undefined-references","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-no-undefined-references","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-no-undefined-references","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Provides the lint rule interface for unified","package":"unified-lint-rule","optional":false},{"reason":"Used internally for location and message handling","package":"vfile","optional":false}],"imports":[{"note":"The package has a default export. Named import will result in undefined.","wrong":"import { remarkLintNoUndefinedReferences } from 'remark-lint-no-undefined-references'","symbol":"remarkLintNoUndefinedReferences","correct":"import remarkLintNoUndefinedReferences from 'remark-lint-no-undefined-references'"},{"note":"Options is a TypeScript type, not a runtime value. Use type import.","wrong":"import { Options } from 'remark-lint-no-undefined-references'","symbol":"Options","correct":"import type { Options } from 'remark-lint-no-undefined-references'"},{"note":"Since v5, the package is ESM-only. In CJS environments, you must use .default or dynamic import().","wrong":"const remarkLintNoUndefinedReferences = require('remark-lint-no-undefined-references')","symbol":"require() usage","correct":"const remarkLintNoUndefinedReferences = require('remark-lint-no-undefined-references').default"}],"quickstart":{"code":"import { unified } from 'unified'\nimport remarkParse from 'remark-parse'\nimport remarkStringify from 'remark-stringify'\nimport remarkLint from 'remark-lint'\nimport remarkLintNoUndefinedReferences from 'remark-lint-no-undefined-references'\nimport { read } from 'to-vfile'\nimport { reporter } from 'vfile-reporter'\n\nconst file = await read('example.md')\n\nawait unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintNoUndefinedReferences, { allowShortcutLink: true })\n  .use(remarkStringify)\n  .process(file)\n\nconsole.error(reporter(file))","lang":"typescript","description":"Sets up a unified pipeline to lint a Markdown file for undefined references, allowing shortcut links."},"warnings":[{"fix":"Use dynamic import() or require('...').default if using CommonJS.","message":"Package is now ESM-only. CJS require() no longer works without .default.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Set allowShortcutLink: true explicitly if you need the old behavior.","message":"Options allowShortcutLink default changed from true to false in v5.","severity":"deprecated","affected_versions":">=5.0.0"},{"fix":"Upgrade Node.js to 16 or later.","message":"Node.js version requirement raised to 16+.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Use remark-lint-no-undefined-references only for reference links; for other link checks use additional rules.","message":"The rule does not check inline links like [text](url) or images ![alt](url) — only reference-style links.","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":"npm install remark-lint-no-undefined-references","cause":"Package not installed or incorrect import path.","error":"Error: Cannot find module 'remark-lint-no-undefined-references'"},{"fix":"Use `import remarkLintNoUndefinedReferences from 'remark-lint-no-undefined-references'` (no braces).","cause":"Using named import instead of default import in ESM.","error":"TypeError: remarkLintNoUndefinedReferences is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}