villesau / optional-chaining-codemod

Codemod to migrate from Lodash get and logical and expressions to optional chaining
MIT License
112 stars 14 forks source link

Add support of custom babel rules #28

Open danylkaaa opened 4 years ago

danylkaaa commented 4 years ago

Hi, thank you for your package. It's great and helps us a lot to migrate our codebase to modern JS style.

In our code we use custom babel plugins, such as @babel/plugin-proposal-decorators When I apply your tool to our code base, I receive erros, like

SyntaxError: This experimental syntax requires enabling one of the following parser plugin(s): 'decorators-legacy, decorators' (11:0)

How I can fix them? Thanks!