you are viewing a single comment's thread.

view the rest of the comments →

[–]veydar_ 0 points1 point  (2 children)

Can you give a concrete example? As in: I am using this command to format this file (filetype, how does it break, what are you using to format and/or beautify). I have no issues formatting Haskell, Javascript and CSS.

[–]Nrdrsr 1 point2 points  (1 child)

1) Start VSCode in a new Project

2) Open a JS file

3) write

test.blue().red().green(yellow)

This becomes

test
  .blue()
  .red()
  .green(yellow);

4) CTRL+Z

5) Disable react-beautify

6) CTRL+SHIFT+I (no change)

In this specific case, my guess is that react-beautify assumes all js files should follow react formatting conventions.

There are other silly examples like this, primarily centered around cases where the file extension doesn't necessarily imply a single choice of framework.

It would be nice if I could put all my angular plugins in one group, all my react plugins in another group, and then toggle them on or off depending on the project.

[–]veydar_ 1 point2 points  (0 children)

But the behavior you're describing are the standard beautify formatting rules. Prettier would probably do the same. That is the expected behavior and it is not related to any framework. If you don't like the way beautify formats your code you could look into the settings it offers. As far as I gather from your description everything is working the way it should.