IEEE-RVCE / IEEE-RVCE.github.io

Development site of only frontend
https://ieee-rvce.org
1 stars 2 forks source link

Configure Default Format #64

Closed Prajwalprakash3722 closed 1 year ago

Prajwalprakash3722 commented 2 years ago

Upcommig days there might be diffrent people working within this repo, Each one might have a diffrent formatting setup, it will format the whole code which will lead to a large Git Diff Better to enforce a paticular style to format on examples are down

~comments are welcome~

chrisvrose commented 2 years ago

Prettier is a good option, as then we won't be necessarily stuck to VSCode.

chrisvrose commented 2 years ago

My recommendation is to use the same as that for the backend The config is actually pretty lean; here is the config being used:

{
  "prettier": {
    "tabWidth": 4,
    "semi": true,
    "singleQuote": true,
    "arrowParens": "avoid"
  }
}

Singlequotes are an opinionated formatting style, it is left to choice.

Prajwalprakash3722 commented 2 years ago

I thought to enforce a default prettier formatting, but this sounds good too..

chrisvrose commented 2 years ago

The default config might work better consider react code is slightly annoying with 4 tabwidth. The config here is just a suggestion, it maintains parity between both codebases