Files
88ef27dd56 Merge babel-check-duplicated-nodes into monorepo (#14420)
* Working helper

* Added pkg.json description

* 1.0.0

* cleanup build scripts

* refactor: convert to TS

* add checkDuplicateNodes to parser tests

* remove babel core injection

* ignore check-duplicate-nodes and readme generator

* add test cases

* refactor: simplify duplicate nodes tracking

Co-authored-by: Mateusz Burzyński <[email protected]>
2022-04-05 20:00:29 -04:00

630 B

@babel/helper-check-duplicate-nodes

Duplicated AST nodes often lead to obscure bugs. This module checks your AST and throws a helpful error if you include a duplicated node in your output. It's useful when authoring babel transforms.

This piece of code was originally written by @nicolo-ribaudo and is included in @babel/helper-transform-fixture-test-runnner.

API

import checkDuplicateNodes from "@babel/helper-check-duplicate-nodes";
checkDuplicateNodes(ast);