{"id":26251,"library":"remark-lint-no-empty-url","title":"remark-lint-no-empty-url","description":"remark-lint rule to warn on empty URLs in links, images, and definitions. Version 4.0.1 is the current stable release, compatible with unified ecosystem and Node.js 16+. ESM-only since v3. Differentiates from generic linting by providing focused, low-overhead checks for empty URLs in Markdown, with no configuration options needed.","status":"active","version":"4.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","empty","image","link","lint","remark","remark-lint","remark-lint-rule","rule","typescript"],"install":[{"cmd":"npm install remark-lint-no-empty-url","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-no-empty-url","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-no-empty-url","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core unified engine required","package":"unified","optional":false},{"reason":"Parent lint plugin providing framework","package":"remark-lint","optional":false},{"reason":"Markdown parser needed to process AST","package":"remark-parse","optional":false},{"reason":"Stringifier for output","package":"remark-stringify","optional":false}],"imports":[{"note":"Package is ESM-only since v3. CommonJS require will fail.","wrong":"const remarkLintNoEmptyUrl = require('remark-lint-no-empty-url')","symbol":"remarkLintNoEmptyUrl","correct":"import remarkLintNoEmptyUrl from 'remark-lint-no-empty-url'"},{"note":"remark-lint must be imported alongside this rule. Also ESM-only.","wrong":"const remarkLint = require('remark-lint')","symbol":"remarkLint","correct":"import remarkLint from 'remark-lint'"},{"note":"Required for parsing Markdown before linting.","wrong":null,"symbol":"remarkParse","correct":"import remarkParse from 'remark-parse'"}],"quickstart":{"code":"import remarkLint from 'remark-lint'\nimport remarkLintNoEmptyUrl from 'remark-lint-no-empty-url'\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(remarkLintNoEmptyUrl)\n  .use(remarkStringify)\n  .process(file)\n\nconsole.error(reporter(file))","lang":"typescript","description":"Demonstrates setting up the remark lint pipeline with the no-empty-url rule, parsing Markdown and reporting warnings."},"warnings":[{"fix":"Use ES module import syntax or switch to v2 if CJS required.","message":"v3 dropped CommonJS support; package is ESM-only.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Upgrade to v4.0.1 and use ESM import.","message":"v2.x is deprecated and no longer maintained.","severity":"deprecated","affected_versions":"<3.0.0"},{"fix":"Ensure pipeline order: .use(remarkParse).use(remarkLint).use(remarkLintNoEmptyUrl).use(remarkStringify)","message":"This rule must be used after remark-parse and remark-stringify in the pipeline, otherwise it may not detect empty URLs.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"If intentional, use a different rule or disable this one.","message":"The rule reports empty URLs even when the empty URL is intended (e.g., for placeholder).","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 dynamic import or use ESM syntax.","cause":"Using require() on an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module not supported."},{"fix":"Add .use(remarkParse) and .use(remarkStringify) before processing.","cause":"Missing unified plugins in pipeline.","error":"TypeError: Cannot read properties of null (reading 'url')"},{"fix":"Use correct pattern, e.g., '**/*.md'.","cause":"CLI glob pattern not matching Markdown files.","error":"No files matching the pattern were found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}