You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this ext is marvelous but I have one problem. I'm using ES6/7 syntax and when I format code all my imports are getting a bit messed up (actually they're getting cleaned up but I'd like them kept as they were).
Example:
import { Some1, Some2 } from Something //this is what I want
is turning into:
import {
Some1,
Some2,
} from Something
which is really painful when I implement some form and use react bootstrap components because there's 5-10 elements just for this one.
as an ugly workaround when you pass the document to js-buityfy you could just skip lines if they start with "import". But if js-beautify would allow you to make it clean that would be perfect :)
This seems to still be an issue. The 'collapse-preserve-inline' param no longer disables this behavior. Uninstalled for the time being but would love a resolution.
If Interested I am trying to fix the problem with a custom extension,
which relies on HookyQR.beautify-0.7.3 but it can be used also with Lonefy.
I still need to finish to test but if you want to try you can have look here
Basically my extension calls HookyQR.beautify-0.7.3 or Lonefy (changeable by configuration)
When the beautifier chosen finishes the job I run mine which convert something like
import {
Some1,
Some2,
} from Something ;
into import { Some1, Some2 } from Something;
for now is important to finish the instruction with semicolon ;
Activity
Lonefy commentedon May 31, 2016
I think this is a
js-beautifyissue. I'll try to find how to configjs-beautifyto make the extension format ES6/7 well.MateuszTrN commentedon Jun 1, 2016
as an ugly workaround when you pass the document to js-buityfy you could just skip lines if they start with "import". But if js-beautify would allow you to make it clean that would be perfect :)
Lonefy commentedon Jun 29, 2016
@MateuszTrN Try to add
"brace_style": "collapse-preserve-inline"in your config file.MateuszTrN commentedon Jul 16, 2016
Hi @Lonefy,
Sorry for late answer. Indeed this helped. Thanks!
gdurastanti commentedon Sep 26, 2016
This seems to still be an issue. The 'collapse-preserve-inline' param no longer disables this behavior. Uninstalled for the time being but would love a resolution.
mdibenedetto commentedon Feb 18, 2017
If Interested I am trying to fix the problem with a custom extension,
which relies on HookyQR.beautify-0.7.3 but it can be used also with Lonefy.
I still need to finish to test but if you want to try you can have look here
Basically my extension calls HookyQR.beautify-0.7.3 or Lonefy (changeable by configuration)
When the beautifier chosen finishes the job I run mine which convert something like
into
import { Some1, Some2 } from Something;for now is important to finish the instruction with semicolon ;
wf-soft commentedon Mar 12, 2023
@Lonefy This function forces the importmap to be formatted into one line, which makes it difficult to read