Remark-lint rule to enforce consistent style for image and link URLs, either references (defined elsewhere) or resources (inline URLs). Current stable version is 1.0.1, part of the remark-lint monorepo. It supports three modes: 'consistent' (auto-detect first usage), 'reference', 'resource', and 'reference-reuse' (allow resources if used once). Only ESM, requires Node.js 16+. TypeScript types exported.
npm install remark-lint-media-styleNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows ESM usage with unified, remark-lint, and the media-style rule configured to prefer resource-style URLs.
Manually set the style to 'reference-reuse' if that behavior is desired.
Use dynamic import() or switch to ESM.
Use 'reference-reuse' instead of expecting automatic detection.
Use import remarkLintMediaStyle from 'remark-lint-media-style' in an ESM context.
Set "type": "module" in package.json or use .mjs extension.