import-js
import-js copied to clipboard
Option to import with double quotes instead of single quotes
At my company, we've standardized on using double quotes for most strings. ImportJS imports files using single strings. Is there a setting I could flip to get it to import with double quotes instead?
Thanks!
I suspect you can use the importStatementFormatter
option to do that:
importStatementFormatter({ importStatement }) {
return importStatement.replace(/'/, '"');
},
I haven't tested this however. A simple config setting would be nicer for sure
@coagmano That did the trick with one minor change!
importStatementFormatter({ importStatement }) {
return importStatement.replace(/'/g, '"');
},
Thanks for the help.