Registry / testing / remark-lint-no-unneeded-full-reference-link

remark-lint-no-unneeded-full-reference-link

JSON →
library4.0.1jsnpmunverified

A remark-lint rule (v4.0.1, ESM-only, ships TypeScript types) that warns when full reference links like `[text][label]` can be collapsed to `[text][]` because the label matches the text. Part of the remark-lint ecosystem, it helps enforce consistent reference link syntax. No configuration options. Active development with frequent releases.

npm install remark-lint-no-unneeded-full-reference-link
INSTALL
IMPORT
SIG · REMARK-LINT-NO-UNN
R
remark-lint-no-unneeded-full-reference-link
testingjavascriptv4.0.1
harness data pending
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 remarkLintNoUnneededFullReferenceLink from 'remark-lint-no-unneeded-full-reference-link'
const remarkLintNoUnneededFullReferenceLink = require('remark-lint-no-unneeded-full-reference-link')
This package is ESM-only since v4.0.0; CommonJS require() will fail.

Shows how to use the rule with unified, reading a markdown file, and reporting lint messages.

import { unified } from 'unified'; import remarkParse from 'remark-parse'; import remarkLint from 'remark-lint'; import remarkStringify from 'remark-stringify'; import remarkLintNoUnneededFullReferenceLink from 'remark-lint-no-unneeded-full-reference-link'; import { reporter } from 'vfile-reporter'; import { read } from 'to-vfile'; const file = await read('example.md'); await unified() .use(remarkParse) .use(remarkLint) .use(remarkLintNoUnneededFullReferenceLink) .use(remarkStringify) .process(file); console.error(reporter(file));
Debug
Known issues
breakingESM-only: this package dropped CommonJS support in v4.0.0.
fix
Switch to ESM imports: use import syntax instead of require().
affects: >=4.0.0
breakingNode.js 16+ required as of v4.0.0 due to ESM-only adoption.
fix
Upgrade Node.js to version 16 or later, or use an older version (v3.x) which supports CJS.
affects: >=4.0.0
gotchaThe rule has no configuration options; attempting to pass options will be silently ignored.
fix
Do not pass options to .use().
affects: >=1.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/remark-lint-no-unneeded-full-reference-link/index.js from /path/to/project/index.js not supported.
Using CommonJS require() on an ESM-only package.
fix
Convert your project to ESM (add "type": "module" in package.json) or use dynamic import().
Cannot find module 'remark-lint-no-unneeded-full-reference-link'
Package not installed or incorrect import path.
fix
Run 'npm install remark-lint-no-unneeded-full-reference-link' and ensure your import/require path matches the package name.
Upgrade
Version history
4.0.1latest on npm
Audit
Dependencies
unifiedrequiredRequired as a peer for the remark ecosystem; the plugin integrates with unified's transformer pipeline.
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-no-unneeded-full-reference-link — npm install remark-lint-no-unneeded-full-reference-link · libregistry