Registry /
type-stubs / remark-lint-double-link
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.
default
✓ import remarkLintDoubleLink from 'remark-lint-double-link'
✗ const remarkLintDoubleLink = require('remark-lint-double-link')
Package is ESM-only since v0.2.0; CommonJS require will fail without bundler support.
remarkLintDoubleLink
✓ import { default as remarkLintDoubleLink } from 'remark-lint-double-link'
Named import of default export; works in TypeScript.
rule
✓ import { rule } from 'remark-lint-double-link'
Exports a `rule` object for programmatic use with unified.
Shows how to use the remark plugin to lint a Markdown file for duplicate links.
import { read } from 'to-vfile';
import { remark } from 'remark';
import remarkLint from 'remark-lint';
import remarkLintDoubleLink from 'remark-lint-double-link';
const file = await remark()
.use(remarkLint)
.use(remarkLintDoubleLink)
.process(await read('example.md'));
console.log(file.messages);
remark --version
Errors
Common errors & fixes
TypeError: remarkLintDoubleLink is not a function
Using CommonJS require on an ESM-only package.
fixReplace require with import statement.
import { rule } from 'remark-lint-double-link' // returns undefined
Named import 'rule' might be the default export in older versions.
fixUse default import: import remarkLintDoubleLink from 'remark-lint-double-link'
Audit
Dependencies
unified-lint-rulerequiredpeer dependency to integrate with remark-lint
remark-lintrequiredrequired to use lint plugins