{"id":26274,"library":"remark-lint-no-unneeded-full-reference-image","title":"remark-lint-no-unneeded-full-reference-image","description":"remark-lint rule that warns when full reference images (`![Alt][alt]`) can be collapsed to `![Alt][]` because the label matches the alt text. Version 4.0.1 is the current stable release from the remark-lint monorepo. ESM-only, ships TypeScript types, no options. Ideal for maintaining image reference consistency in markdown projects. Compared to other lint rules, this one is narrowly focused on image reference style and integrates seamlessly into unified/remark ecosystem without configuration.","status":"active","version":"4.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","collapsed","full","image","lint","reference","remark","remark-lint","remark-lint-rule","typescript"],"install":[{"cmd":"npm install remark-lint-no-unneeded-full-reference-image","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-no-unneeded-full-reference-image","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-no-unneeded-full-reference-image","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"must be applied alongside the base remark-lint plugin","package":"remark-lint","optional":false}],"imports":[{"note":"ESM-only since v3; no named export, default export only.","wrong":"const { remarkLintNoUnneededFullReferenceImage } = require('remark-lint-no-unneeded-full-reference-image')","symbol":"remarkLintNoUnneededFullReferenceImage","correct":"import remarkLintNoUnneededFullReferenceImage from 'remark-lint-no-unneeded-full-reference-image'"},{"note":"unified is ESM-only from v10 onward.","wrong":"const unified = require('unified')","symbol":"unified","correct":"import { unified } from 'unified'"},{"note":"vfile-reporter v8+ exports reporter as named export, not default.","wrong":"import reporter from 'vfile-reporter'","symbol":"reporter","correct":"import { reporter } from 'vfile-reporter'"}],"quickstart":{"code":"import { unified } from 'unified'\nimport remarkParse from 'remark-parse'\nimport remarkStringify from 'remark-stringify'\nimport remarkLint from 'remark-lint'\nimport remarkLintNoUnneededFullReferenceImage from 'remark-lint-no-unneeded-full-reference-image'\nimport { reporter } from 'vfile-reporter'\nimport { read } from 'to-vfile'\n\nconst file = await read('example.md')\n\nawait unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintNoUnneededFullReferenceImage)\n  .use(remarkStringify)\n  .process(file)\n\nconsole.error(reporter(file))","lang":"javascript","description":"Shows how to import and use the lint rule with unified, parse, stringify, and the vfile reporter."},"warnings":[{"fix":"Use import syntax instead of require().","message":"ESM only since v3; no CommonJS support.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Update peer dependencies: unified@11, remark-lint@10.","message":"v3+ requires remark-lint >=10.0.0 and unified >=11.0.0.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Upgrade to v3+ and use the default import as shown.","message":"v2 used a different default export name (index).","severity":"deprecated","affected_versions":"=2.0.0"},{"fix":"Use a different rule or custom plugin if tailoring is needed.","message":"No options accepted; rule behavior cannot be customized.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Understand scope: only triggers on images like `![alt][alt]`.","message":"Rule checks full reference images only; does not affect collapsed or shortcut references.","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":"Change to import or ensure Node.js is in ESM mode.","cause":"Using require() on an ESM-only package.","error":"Dynamic require of \"remark-lint-no-unneeded-full-reference-image\" is not supported"},{"fix":"Install remark-lint alongside this package.","cause":"Missing required peer dependency remark-lint.","error":"Could not resolve \"remark-lint\""},{"fix":"Change `![alt][alt]` to `![alt][]`.","cause":"Image reference where label matches alt text can be collapsed.","error":"Unexpected full reference image (`![text][label]`) where the identifier can be inferred from the text, expected collapsed reference (`![text][]`)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}