{"id":26270,"library":"remark-lint-no-shortcut-reference-link","title":"remark-lint-no-shortcut-reference-link","description":"A remark-lint rule that warns when shortcut reference links (`[text]` without explicit brackets for the label) are used in Markdown. Version 4.0.1 is the latest stable release, part of the remark-lint monorepo. It enforces consistency by recommending collapsed or full reference links instead. This rule is included in recommended and markdown style guide presets. Rules are updated regularly; check the main remark-lint releases.","status":"active","version":"4.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","link","lint","reference","remark","remark-lint","remark-lint-rule","rule","shortcut","typescript"],"install":[{"cmd":"npm install remark-lint-no-shortcut-reference-link","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-no-shortcut-reference-link","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-no-shortcut-reference-link","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; remark-lint rules are unified plugins.","package":"unified","optional":false},{"reason":"Required to use remark-lint rules; this package is a rule for remark-lint.","package":"remark-lint","optional":false},{"reason":"Needed to parse Markdown; typically used in the pipeline.","package":"remark-parse","optional":true},{"reason":"Needed to stringify Markdown; typically used in the pipeline.","package":"remark-stringify","optional":true}],"imports":[{"note":"Package is ESM-only since v4; no CJS support. In Node.js 16+, use import.","wrong":"const remarkLintNoShortcutReferenceLink = require('remark-lint-no-shortcut-reference-link')","symbol":"remarkLintNoShortcutReferenceLink","correct":"import remarkLintNoShortcutReferenceLink from 'remark-lint-no-shortcut-reference-link'"},{"note":"The package exports a single default function, not a named export.","wrong":"import { remarkLintNoShortcutReferenceLink } from 'remark-lint-no-shortcut-reference-link'","symbol":"No default export; use default export","correct":"import remarkLintNoShortcutReferenceLink from 'remark-lint-no-shortcut-reference-link'"},{"note":"Types are included; no separate @types package needed.","wrong":null,"symbol":"TypeScript types","correct":"import type { Plugin } from 'unified'; import remarkLintNoShortcutReferenceLink from 'remark-lint-no-shortcut-reference-link'"}],"quickstart":{"code":"import remarkLint from 'remark-lint'\nimport remarkLintNoShortcutReferenceLink from 'remark-lint-no-shortcut-reference-link'\nimport remarkParse from 'remark-parse'\nimport remarkStringify from 'remark-stringify'\nimport {unified} from 'unified'\nimport {reporter} from 'vfile-reporter'\n\nconst file = await unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintNoShortcutReferenceLink)\n  .use(remarkStringify)\n  .process('[Mercury]\\n\\n[mercury]: https://example.com/mercury/')\n\nconsole.error(reporter(file))","lang":"typescript","description":"Lints Markdown with the shortcut-reference-link rule using unified pipeline."},"warnings":[{"fix":"Use import syntax or upgrade Node.js to 16+ and set type:\"module\" in package.json.","message":"Package is ESM-only from v4.0.0. CommonJS require() will fail.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Upgrade to Node.js 16 or later.","message":"Minimum Node.js version is 16, older versions are not supported.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Remove any options object: .use(remarkLintNoShortcutReferenceLink) with no arguments.","message":"This rule does not accept any options. Passing options silently ignored.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure remark-lint is also used: .use(remarkLint).use(remarkLintNoShortcutReferenceLink).","message":"Rule only works with remark-lint plugin; using it directly without remark-lint has no effect.","severity":"gotcha","affected_versions":"all"},{"fix":"","message":"No deprecations known in current version.","severity":"deprecated","affected_versions":"none"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install: npm install remark-lint-no-shortcut-reference-link. If using require, switch to import or use dynamic import().","cause":"Package not installed or ESM-only import used in CJS context.","error":"Cannot find module 'remark-lint-no-shortcut-reference-link'"},{"fix":"Set type: \"module\" in package.json or rename file to .mjs.","cause":"Using import statement in a non-ESM file (no type:module or .mjs extension).","error":"SyntaxError: Unexpected identifier 'remarkLintNoShortcutReferenceLink'"},{"fix":"Use .use(remarkLintNoShortcutReferenceLink) without arguments (rule accepts no options).","cause":"Trying to use the rule without unified, or passing options incorrectly.","error":"TypeError: remarkLintNoShortcutReferenceLink is not a function"},{"fix":"Add .use(remarkLint) before the rule.","cause":"Missing remark-lint plugin itself; rules are inactive without it.","error":"No warnings emitted even for shortcut reference links"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}