{"id":26268,"library":"remark-lint-no-reference-like-url","title":"remark-lint-no-reference-like-url","description":"remark-lint rule that warns when URLs are also defined identifiers, helping catch likely broken references in Markdown. Current version 4.0.1, part of the remark-lint monorepo. ESM-only, requires Node.js 16+. No presets include it; use as a standalone lint rule. Differentiates from other lint rules by focusing on the specific pattern of resource links that should be reference links to avoid ambiguity.","status":"active","version":"4.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","definition","lint","referece","remark","remark-lint","remark-lint-rule","rule","url","typescript"],"install":[{"cmd":"npm install remark-lint-no-reference-like-url","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-no-reference-like-url","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-no-reference-like-url","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Plugin interface dependency","package":"unified","optional":false},{"reason":"Provides linting framework","package":"remark-lint","optional":false}],"imports":[{"note":"Default export only; named export is incorrect since v1.","wrong":"import { remarkLintNoReferenceLikeUrl } from 'remark-lint-no-reference-like-url'","symbol":"remarkLintNoReferenceLikeUrl","correct":"import remarkLintNoReferenceLikeUrl from 'remark-lint-no-reference-like-url'"},{"note":"Do not call the function; pass it directly.","wrong":".use(remarkLintNoReferenceLikeUrl())","symbol":"plugin usage","correct":".use(remarkLintNoReferenceLikeUrl)"},{"note":"Removed in v3. Use import or dynamic import.","wrong":"const { remarkLintNoReferenceLikeUrl } = require('remark-lint-no-reference-like-url')","symbol":"require in CJS","correct":"const remarkLintNoReferenceLikeUrl = require('remark-lint-no-reference-like-url')"}],"quickstart":{"code":"import { unified } from 'unified';\nimport remarkParse from 'remark-parse';\nimport remarkStringify from 'remark-stringify';\nimport remarkLint from 'remark-lint';\nimport remarkLintNoReferenceLikeUrl from 'remark-lint-no-reference-like-url';\nimport { reporter } from 'vfile-reporter';\n\nconst file = await unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintNoReferenceLikeUrl)\n  .use(remarkStringify)\n  .process('[**Mercury**](mercury) is the first planet from the sun.\\n\\n[mercury]: https://example.com/mercury/');\n\nconsole.error(reporter(file));","lang":"typescript","description":"Demonstrates how to use the rule to lint Markdown and detect resource links that look like references."},"warnings":[{"fix":"Change your code to use import or dynamic import()","message":"CommonJS require() is no longer supported. Use ESM imports.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Ensure you add it as a separate plugin in your remark configuration","message":"The plugin is not included in any preset and must be added explicitly.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Do not pass any arguments to .use(). There are no options.","message":"The rule does not have options, but some users try to pass configuration; it's a simple boolean check.","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-reference-like-url","cause":"Package not installed or wrong version","error":"Cannot find module 'remark-lint-no-reference-like-url'"},{"fix":".use(remarkLintNoReferenceLikeUrl) not .use(remarkLintNoReferenceLikeUrl())","cause":"Calling the plugin instead of passing it directly","error":"TypeError: Illegal invocation: function must be called without new"},{"fix":"Use import or dynamic import()","cause":"Trying to require() an ESM-only package","error":"ERR_REQUIRE_ESM"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}