1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/** * Returns true if the given module is required from eslint */ const isESLint = (mod) => { let parent = mod.parent; while (parent) { if (parent.filename && parent.filename.includes('/eslint')) { return true; } parent = parent.parent; } return false; }; module.exports = isESLint;