UNPKG

eslint-plugin-mdx

Version:
27 lines • 890 B
import { ENABLED_OPTION_SCHEMA, getRuleConfig } from './helpers.js'; export const noShortcutReferenceImage = { meta: { type: 'problem', docs: { description: 'Disallow shortcut reference images', }, schema: [ENABLED_OPTION_SCHEMA], }, create(context) { const config = getRuleConfig(context, 'no-shortcut-reference-image'); if (!config) { return {}; } return { MDImageReference(node) { if (node.referenceType === 'shortcut') { context.report({ loc: node.loc, message: 'Unexpected shortcut reference image (`![text]`), expected collapsed reference (`![text][]`)', }); } }, }; }, }; //# sourceMappingURL=no-shortcut-reference-image.js.map