Registry /
testing / remark-lint-no-reference-like-url
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
remarkLintNoReferenceLikeUrl
✓ import remarkLintNoReferenceLikeUrl from 'remark-lint-no-reference-like-url'
✗ import { remarkLintNoReferenceLikeUrl } from 'remark-lint-no-reference-like-url'
Default export only; named export is incorrect since v1.
plugin usage
✓ .use(remarkLintNoReferenceLikeUrl)
✗ .use(remarkLintNoReferenceLikeUrl())
Do not call the function; pass it directly.
require in CJS
✓ const remarkLintNoReferenceLikeUrl = require('remark-lint-no-reference-like-url')
✗ const { remarkLintNoReferenceLikeUrl } = require('remark-lint-no-reference-like-url')
Removed in v3. Use import or dynamic import.
Demonstrates how to use the rule to lint Markdown and detect resource links that look like references.
import { unified } from 'unified';
import remarkParse from 'remark-parse';
import remarkStringify from 'remark-stringify';
import remarkLint from 'remark-lint';
import remarkLintNoReferenceLikeUrl from 'remark-lint-no-reference-like-url';
import { reporter } from 'vfile-reporter';
const file = await unified()
.use(remarkParse)
.use(remarkLint)
.use(remarkLintNoReferenceLikeUrl)
.use(remarkStringify)
.process('[**Mercury**](mercury) is the first planet from the sun.\n\n[mercury]: https://example.com/mercury/');
console.error(reporter(file));
Errors
Common errors & fixes
Cannot find module 'remark-lint-no-reference-like-url'
Package not installed or wrong version
fixnpm install remark-lint-no-reference-like-url
TypeError: Illegal invocation: function must be called without new
Calling the plugin instead of passing it directly
fix.use(remarkLintNoReferenceLikeUrl) not .use(remarkLintNoReferenceLikeUrl())
ERR_REQUIRE_ESM
Trying to require() an ESM-only package
fixUse import or dynamic import()
Audit
Dependencies
unifiedrequiredPlugin interface dependency
remark-lintrequiredProvides linting framework