mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* fix: fixed issue16583 + test * modified getBinding to getOwnBinding (same scope) * reverted babel-plugin-proposal-do-expressions back * refactor: moved fix from scope/index.ts to path/removal.ts * add fail test * fix * review * Update packages/babel-traverse/test/fixtures/scope/remove-nested-let-path/plugin.js Co-authored-by: Nicolò Ribaudo <[email protected]> * review * Update packages/babel-traverse/src/path/lib/removal-hooks.ts --------- Co-authored-by: Babel Bot <[email protected]> Co-authored-by: Nicolò Ribaudo <[email protected]>
11 lines
197 B
JavaScript
11 lines
197 B
JavaScript
module.exports = function () {
|
|
return {
|
|
visitor: {
|
|
VariableDeclarator(path) {
|
|
path.remove();
|
|
expect(path.scope.getBinding("a")).toBeUndefined();
|
|
},
|
|
},
|
|
};
|
|
};
|