gitlab-org--gitlab-foss/config/helpers/is_eslint.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
312 B
JavaScript
Raw Normal View History

/**
* Returns true if the given module is required from eslint
*/
const isESLint = (mod) => {
let { parent } = mod;
while (parent) {
if (parent.filename && parent.filename.includes('/eslint')) {
return true;
}
parent = parent.parent;
}
return false;
};
module.exports = isESLint;