Config option for "export default"
nickakey opened this issue · comments
Many style guides (like Airbnb's) require single export files to use export default
.
It would be nice if there was a configuration option to default extracted files to export default
, and to set the relevant import without destructuring�.
@nickakey Thanks for the idea! I think it can done quiet easily. Would live a PR. I can point you in the right direction. Otherwise, I will get to it soon myself :)
I'd be delighted to make a PR. Please point away! :)
Ok, so it goes like this:
First of all, i assume we need a new configuration options:
https://github.com/wix/vscode-glean/blob/master/package.json#L40
Then, u need to handle this in one of the methods called here:
https://github.com/wix/vscode-glean/blob/24ff2b074f5d2512cbdbea9fe6fe2616108caad2/src/parsing.ts#L96
Use this to retrieve the configuration value:
https://github.com/wix/vscode-glean/blob/ab8a7cf86d18d7b6467adf62fd080dd1ca2733d4/src/editor.ts#L15
Thank you! Tell me if I can be of more help :)
I would love to have this feature too
@wunnle I hope to get to this soon. However, i'd love a PR. See the instructions above. Its pretty easy
@wunnle @nickakey Its here! Part of version 4.20!
https://github.com/wix/vscode-glean/blob/master/package.json#L70