JavaScriptPrettier icon indicating copy to clipboard operation
JavaScriptPrettier copied to clipboard

HTML and CSS formatting

Open warpech opened this issue 7 years ago • 8 comments

Any plans to make this extension also make HTML and CSS prettier, not just JS and TS?

warpech avatar Jun 09 '18 21:06 warpech

I was just thinking the same thing. Prettier supports lots of formats like:

JavaScript · Flow · TypeScript · CSS · SCSS · Less · JSX · Vue · GraphQL · JSON · Markdown · YAML

@madskristensen Should we rename this plugin and make it fully support all formats prettier supports?

tommck avatar Jul 15 '18 12:07 tommck

@madskristensen @jesperbjensen

What do you think? Rename + Support all these formats? Maybe have a list of checkboxes on the options page w/ JS + TS checked by default?

tommck avatar Aug 27 '18 12:08 tommck

Should I just fork this and do that?

tommck avatar Sep 01 '18 11:09 tommck

I think you should go ahead if you like. It would be cool to support more fileformats.

About the forking thing (and self publishing it). Then I think you should do it if makes working with it faster. I don’t have the power to publish to the gallery - so we needs mads to do that.

I think the most important thing is to embrace the open source thing - and if a fork is the best approach go get to the destination I think you should do that.

But I see no reason it can’t be one project. I think we should support the same stuff as prettier - no reason to narrow it to TypeScript or JavaScript - but maybe we end it making Mads a owner of a bigger thing that he anticipated.

jesperbjensen avatar Sep 02 '18 17:09 jesperbjensen

I have no problem with it supporting all the other formats too

madskristensen avatar Sep 04 '18 15:09 madskristensen

OK, we'll just keep the name the same then? I figured, we could add more options with the list of extensions in the OptionsPage for each extension type as well

tommck avatar Sep 04 '18 16:09 tommck

So, it seems that there are only built-in definitions of the following content types: "TypeScript", "JavaScript", "css", "LESS" and "SCSS" out of this list from the prettier site:

JavaScript · Flow · TypeScript · CSS · SCSS · Less · JSX · Vue · GraphQL · JSON · Markdown · YAML

I'm assuming I have to create new content types for the others. Or, should I somehow try to associate a whole list of extensions as a "prettier supported type" or something? (clueless as to the right approach here)

I'll dig around, but if someone can point me in the right direction, let me know

tommck avatar Sep 09 '18 12:09 tommck

@tommck any progress? Since prettier also supports even c#, maybe it's worth to go "enable for all" approach with a blacklist of extensions?

OlegGavrilov avatar Jan 14 '19 08:01 OlegGavrilov