madskristensen / JavaScriptPrettier

A Visual Studio extension
Other
157 stars 30 forks source link

Configuration and parser hinting #15

Closed jesperbjensen closed 6 years ago

jesperbjensen commented 6 years ago

Prettier has a --stdin-filepath argument that works wonders:

  1. It selects the correct parser according to the filename - so TypeScript works alot better.
  2. It looks for Prettier configuration files according to their configuration pattern. So people can use the configuration file that the VSCode extension uses and such.

I have also removed the Visual Studio formatting after the Prettier command. I'm not sure if you like that change - but it can be very confusing if you change the default tab size, and then Visual Studio goes in and reverts that to it's own formatting. We can add it back in if you like.

This matched with Pull Request #14 should fix:

12

8

4

But I haven't had time to really test each of them.

madskristensen commented 6 years ago

Awesome. Thanks

madskristensen commented 6 years ago

New build is available here for testing http://vsixgallery.com/extension/J1da7ad9e-85b3-4a0c-8e45-b2ae59a575a7/