UNPKG

eslint-plugin-mdx

Version:
19 lines 1 kB
import { cjsRequire } from '../helpers.js'; export const processorOptions = {}; const linterPath = Object.keys(cjsRequire.cache).find(path => /([/\\])eslint\1lib(?:\1linter){2}\.js$/.test(path)); if (!linterPath) { throw new Error('Could not find ESLint Linter in require cache'); } const ESLinter = cjsRequire(linterPath).Linter; const { verify } = ESLinter.prototype; ESLinter.prototype.verify = function (code, config, options) { const settings = ((config.extractConfig?.(typeof options === 'undefined' || typeof options === 'string' ? options : options.filename) ?? config).settings ?? {}); processorOptions.lintCodeBlocks = settings['mdx/code-blocks']; processorOptions.languageMapper = settings['mdx/language-mapper']; processorOptions.ignoreRemarkConfig = settings['mdx/ignore-remark-config']; processorOptions.remarkConfigPath = settings['mdx/remark-config-path']; return verify.call(this, code, config, options); }; //# sourceMappingURL=options.js.map