Closed derwaldgeist closed 7 years ago
You should raise this issue at the beautify repo as I don't format code.
From: Tom Brücknermailto:notifications@github.com Sent: 30/07/2017 14:53 To: gandm/language-babelmailto:language-babel@noreply.github.com Cc: Subscribedmailto:subscribed@noreply.github.com Subject: [gandm/language-babel] Autoformat breaks code for comments (#391)
I am using language-babel in combination with atom-beautify.
In adapter.js, there is the following lines:
// add promise support ['createOffer', 'createAnswer'].forEach(function(method) { ...
If I enable language-babel, this is auto-beautified to:
// add promise support['createOffer', 'createAnswer'].forEach(function(method) { ...
effectively breaking the code.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/gandm/language-babel/issues/391, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACNMFZTs6wBpfKkZm6jRhAsKxMFpBlwDks5sTIregaJpZM4OnpCs.
So you think it's not related to the babel package? Strange thing is: it works if I disable this package.
Yes I think it is the beautifier. The actual beautifier used depends on the scope of the grammar used. My scope is source.js.jsx therefore a jsx beautifier is used. If you use the atom JavaScript grammar it uses source.js and maybe another beautifier.
From: Tom Brücknermailto:notifications@github.com Sent: 30/07/2017 15:25 To: gandm/language-babelmailto:language-babel@noreply.github.com Cc: Grahammailto:gandmclark@gmail.com; Commentmailto:comment@noreply.github.com Subject: Re: [gandm/language-babel] Autoformat breaks code for comments (#391)
So you think it's not related to the babel package? Strange thing is: it works if I disable this package.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/gandm/language-babel/issues/391#issuecomment-318905117, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACNMFcQihUdDmo_K1Mx7xEnloj4f8Ib6ks5sTJItgaJpZM4OnpCs.
From the atom-beautify readme that shows the default beautifiers used..
Ok, thanks, I filed an issue there.
I am using
language-babel
in combination withatom-beautify
.In adapter.js, there is the following lines:
If I enable
language-babel
, this is auto-beautified on save to:effectively breaking the code.