codeclimate/codeclimate-duplication

Configurable Babylon plugins for JS

dfreeman opened this issue · 2 comments

Right now, the selection of plugins passed to Babylon for parsing JavaScript files appears to be hard-coded. A one-size-fits-all approach doesn't seem ideal here, though — for instance, in our codebase we don't use JSX, but we do have a number of async functions, which are rejected as invalid syntax.

It would be great if the Babylon plugins could be set up as part of the configuration for the duplication engine for a given codebase.

Hi, thanks for the suggestion -- this does sound useful. Unfortunately, I can't offer a timeline for when we'd be able to implement that, so I'm adding the help-wanted tag. Maybe someone in the community would like to try implementing it?

Hey @dfreeman,

We're moving to a new parsing infrastructure that will likely require a different approach to support varying flavors of javascript, so I'm going to close this issue.

Happy to keep you in the loop as that infrastructure matures.