{"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,"search_vec":"'16':34 '4.0.1':22 'check':50 'compat':28 'configur':58 'current':25 'definit':20 'differenti':40 'ecosystem':31 'empti':5,14,52,62 'esm':36 'esm-on':35 'focus':46 'generic':42 'imag':18,63 'javascript':61 'link':17,64 'lint':3,9,43,65,69,72 'low':48 'low-overhead':47 'markdown':55 'need':60 'node.js':33 'option':59 'overhead':49 'provid':45 'releas':27 'remark':2,8,66,68,71 'remark-lint':7,67 'remark-lint-no-empty-url':1 'remark-lint-rul':70 'rule':10,73,74 'sinc':38 'stabl':26 'typescript':75 'unifi':30 'url':6,15,53 'v3':39 'version':21 'warn':12","created_at":"2026-05-01T13:49:00.508613+00:00","updated_at":"2026-05-01T13:49:00.508613+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/remarkjs/remark-lint.git#main","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/remark-lint-no-empty-url","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}