smaranjitghose/girlscript_chennai_website

Setting code format standard using prettier

Closed this issue ยท 4 comments

Mentors I want to include a .prettierrc file with some uniform code standard to put into codebase so all the code HTML, CSS, and JS can be formatted with uniform setting across all developer's editor settings, which right now keeps changing based on independent editor settings and can be be very difficult to work upon!

I want to do it for community and not under GSSoC since it will great addition and it is for everyone's benefit I believe. (You guys can look into it)
Also, anyone can chip in with their editor settings so we can bring one on common to follow.

This will prevent awkward indentation of code, leftover semi-colons, and one-liner CSS to work in a much better way!
@anushbhatia @smaranjitghose What do you think?

Linters can be also added but I don't think everyone would be comfortable with it so prettier is the simplest solution

@Adyasha8105 @aashimgarg @shreyakapoor08 @ashishnagpal2498 and other developers (I haven't tagged them to avoid spamming) you may chip in as well (comment below with things you want so we can find the common once ) so it can be uniform for all of us.
Let it get verified by mentors first

Well, I really appreciate the idea of a custom config file for prettier. If you wish, later ES Lint can also be added.

Let @anushbhatia confirm once as well, you can surely go ahead with this then

I would suggest some of you to create Wikis for this, so that beginners who are not aware of prettier can have a step by step tutorial, how to make use of this config file, Format on Exit, etc

As we are in 2020, VSCODE is the default choice and the extension from the marketplace is quite neat compared to the npm or yarn builds. However, other editors like Atom,Sublime,Emacs or Vim are also appreciated for building the file

You can make it as a .json file

@abhu-A-J we can also think of using prettier VS code plugin

@abhu-A-J we can also think of using prettier VS code plugin

Yes, I'm thinking the same but to override certain defaults ( or your favourite setting on you personalized dev) we can keep out in a config file just on this project! Maintains uniformity? I think we can do that? @aashimgarg ! What do you think?

@abhu-A-J we can also think of using prettier VS code plugin

Yes, I'm thinking the same but to override certain defaults ( or your favourite setting on you personalized dev) we can keep out in a config file just on this project! Maintains uniformity? I think we can do that? @aashimgarg ! What do you think?

in JSON format would be the best i think. As its easy to understand also.