require-from-eslint.js 233 B

123456789
  1. "use strict";
  2. const resolve = require("resolve");
  3. const eslintBase = require.resolve("eslint");
  4. module.exports = function requireFromESLint(id) {
  5. const path = resolve.sync(id, { basedir: eslintBase });
  6. return require(path);
  7. };