Open nene opened 8 years ago
Specifying various settings such as { useTabs: true, quote: 'single' }
would work in most cases. Sometimes, however, the indentation was mixed. I imagine this relates to the discussion here: https://github.com/benjamn/recast/pull/404. The most reliable workaround I have found is to simply call recast.print
without any options, and then use eslint --fix
to reindent correctly.
When running the following code:
I'd expect to get:
But instead Recast gives me:
NOTE: There are no docs to tell me whether I should pass
useTabs
option torecast.parse()
orrecast.print()
, it seems that it's only needed for the latter, but just in case I'm passing it to both.