Debian Codegraph @

scripts/babel-plugin-remove-create-require.js

raw symbols SCIP
1 module.exports = function() {
2 return {
3 visitor: {
4 VariableDeclarator(path) {
5 if (
6 path.get("id").isIdentifier({ name: "require" }) &&
7 path.get("init").isCallExpression() &&
8 path.get("init.callee").isIdentifier({ name: "createRequire" })
9 ) {
10 path.remove();
11 }
12 },
13 },
14 };
15 };