Why is VSCode Prettier is taking my divs apart?Why does jsx code formatting not correctlyHow to customize the tab-to-space conversion factor?How do you format code in Visual Studio Code (VSCode)Multiline editing in Visual Studio CodeFind and replace with a newline in Visual Studio CodeOpen files always in a new tabVSCode: How to Split Editor VerticallyCollapse all methods in Visual Studio CodeWhy Prettier does not format code in VSCODE?Ugly formatting with Prettier Add-on in VSC when using Destructuring ES6Prettier doesn't format angular templates on vscode

Who is responsible to align all Warhammer 40k books or stories?

Align all symbols in a LaTeX equation

How to justify getting additional team member when the current team is doing well?

Duplicate Tuples in two different ways

What is the difference between an astronaut in the ISS and a freediver in perfect neutral buoyancy?

Medic abilities

We are on WHV, my boyfriend was in a small collision, we are leaving in 2 weeks what happens if we don’t pay the damages?

Is differentiation as a map discontinuous?

Top off gas with old oil, is that bad?

What exactly did this mechanic sabotage on the American Airlines 737, and how dangerous was it?

What does it mean by "my days-of-the-week underwear only go to Thursday" in this context?

Another student has been assigned the same MSc thesis as mine (and already defended)

Which lens has the same capability of lens mounted in Nikon P1000?

MaxDetect speed

I am not a pleasant sight

How to stop the death waves in my city?

My Project Manager does not accept carry-over in Scrum, Is that normal?

A food item only made possible by time-freezing storage?

One-digit products in a row of numbers

Why did the Soviet Union not "grant" Inner Mongolia to Mongolia after World War Two?

How should I answer custom and border protection questions if I'm a returning citizen that hasn't been in the country for almost a decade?

Windows 10 deletes lots of tiny files super slowly. Anything that can be done to speed it up?

How to deal with a PC being played as homophobic?

Should the average user with no special access rights be worried about SMS-based 2FA being theoretically interceptable?



Why is VSCode Prettier is taking my divs apart?


Why does jsx code formatting not correctlyHow to customize the tab-to-space conversion factor?How do you format code in Visual Studio Code (VSCode)Multiline editing in Visual Studio CodeFind and replace with a newline in Visual Studio CodeOpen files always in a new tabVSCode: How to Split Editor VerticallyCollapse all methods in Visual Studio CodeWhy Prettier does not format code in VSCODE?Ugly formatting with Prettier Add-on in VSC when using Destructuring ES6Prettier doesn't format angular templates on vscode






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I am using Prettier in Visual Studio Code.
I am using JSX, and when i vrite <div>, Prettier disolves it into 2 lines, like this



class App extends Component 
render()
return ( <
div className = "App" >

<
/div>
);




How can i prevent it?










share|improve this question


























  • Can you create an empty file and just put the div there? See if prettier breaks it too.

    – AskYous
    Mar 28 at 18:40











  • I have disabled Prettier, but it still happens !? I tried both .js and .jsx estension. Changed nothing.

    – Mario Nezmah
    Mar 28 at 18:44











  • I have found temporary solution. in settings.json deleted this row: "editor. formatOnSave": true, but this is not permanent solution, because I cannot use Prettier.

    – Mario Nezmah
    Mar 28 at 19:02






  • 3





    They found out that the extension "Beautify" was causing the issue. Does that help?

    – AskYous
    Mar 28 at 19:18






  • 1





    Yes, I didn't understand that thread well. I have Beautify installed. I disabled it. I think this should work. Thanks :)

    – Mario Nezmah
    Mar 30 at 12:54

















2















I am using Prettier in Visual Studio Code.
I am using JSX, and when i vrite <div>, Prettier disolves it into 2 lines, like this



class App extends Component 
render()
return ( <
div className = "App" >

<
/div>
);




How can i prevent it?










share|improve this question


























  • Can you create an empty file and just put the div there? See if prettier breaks it too.

    – AskYous
    Mar 28 at 18:40











  • I have disabled Prettier, but it still happens !? I tried both .js and .jsx estension. Changed nothing.

    – Mario Nezmah
    Mar 28 at 18:44











  • I have found temporary solution. in settings.json deleted this row: "editor. formatOnSave": true, but this is not permanent solution, because I cannot use Prettier.

    – Mario Nezmah
    Mar 28 at 19:02






  • 3





    They found out that the extension "Beautify" was causing the issue. Does that help?

    – AskYous
    Mar 28 at 19:18






  • 1





    Yes, I didn't understand that thread well. I have Beautify installed. I disabled it. I think this should work. Thanks :)

    – Mario Nezmah
    Mar 30 at 12:54













2












2








2








I am using Prettier in Visual Studio Code.
I am using JSX, and when i vrite <div>, Prettier disolves it into 2 lines, like this



class App extends Component 
render()
return ( <
div className = "App" >

<
/div>
);




How can i prevent it?










share|improve this question
















I am using Prettier in Visual Studio Code.
I am using JSX, and when i vrite <div>, Prettier disolves it into 2 lines, like this



class App extends Component 
render()
return ( <
div className = "App" >

<
/div>
);




How can i prevent it?







visual-studio-code vscode-settings






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 19:14









Gama11

15.9k6 gold badges33 silver badges53 bronze badges




15.9k6 gold badges33 silver badges53 bronze badges










asked Mar 28 at 18:35









Mario NezmahMario Nezmah

821 silver badge10 bronze badges




821 silver badge10 bronze badges















  • Can you create an empty file and just put the div there? See if prettier breaks it too.

    – AskYous
    Mar 28 at 18:40











  • I have disabled Prettier, but it still happens !? I tried both .js and .jsx estension. Changed nothing.

    – Mario Nezmah
    Mar 28 at 18:44











  • I have found temporary solution. in settings.json deleted this row: "editor. formatOnSave": true, but this is not permanent solution, because I cannot use Prettier.

    – Mario Nezmah
    Mar 28 at 19:02






  • 3





    They found out that the extension "Beautify" was causing the issue. Does that help?

    – AskYous
    Mar 28 at 19:18






  • 1





    Yes, I didn't understand that thread well. I have Beautify installed. I disabled it. I think this should work. Thanks :)

    – Mario Nezmah
    Mar 30 at 12:54

















  • Can you create an empty file and just put the div there? See if prettier breaks it too.

    – AskYous
    Mar 28 at 18:40











  • I have disabled Prettier, but it still happens !? I tried both .js and .jsx estension. Changed nothing.

    – Mario Nezmah
    Mar 28 at 18:44











  • I have found temporary solution. in settings.json deleted this row: "editor. formatOnSave": true, but this is not permanent solution, because I cannot use Prettier.

    – Mario Nezmah
    Mar 28 at 19:02






  • 3





    They found out that the extension "Beautify" was causing the issue. Does that help?

    – AskYous
    Mar 28 at 19:18






  • 1





    Yes, I didn't understand that thread well. I have Beautify installed. I disabled it. I think this should work. Thanks :)

    – Mario Nezmah
    Mar 30 at 12:54
















Can you create an empty file and just put the div there? See if prettier breaks it too.

– AskYous
Mar 28 at 18:40





Can you create an empty file and just put the div there? See if prettier breaks it too.

– AskYous
Mar 28 at 18:40













I have disabled Prettier, but it still happens !? I tried both .js and .jsx estension. Changed nothing.

– Mario Nezmah
Mar 28 at 18:44





I have disabled Prettier, but it still happens !? I tried both .js and .jsx estension. Changed nothing.

– Mario Nezmah
Mar 28 at 18:44













I have found temporary solution. in settings.json deleted this row: "editor. formatOnSave": true, but this is not permanent solution, because I cannot use Prettier.

– Mario Nezmah
Mar 28 at 19:02





I have found temporary solution. in settings.json deleted this row: "editor. formatOnSave": true, but this is not permanent solution, because I cannot use Prettier.

– Mario Nezmah
Mar 28 at 19:02




3




3





They found out that the extension "Beautify" was causing the issue. Does that help?

– AskYous
Mar 28 at 19:18





They found out that the extension "Beautify" was causing the issue. Does that help?

– AskYous
Mar 28 at 19:18




1




1





Yes, I didn't understand that thread well. I have Beautify installed. I disabled it. I think this should work. Thanks :)

– Mario Nezmah
Mar 30 at 12:54





Yes, I didn't understand that thread well. I have Beautify installed. I disabled it. I think this should work. Thanks :)

– Mario Nezmah
Mar 30 at 12:54












0






active

oldest

votes














Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);














draft saved

draft discarded
















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55404690%2fwhy-is-vscode-prettier-is-taking-my-divs-apart%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55404690%2fwhy-is-vscode-prettier-is-taking-my-divs-apart%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript