novicell-frontend icon indicating copy to clipboard operation
novicell-frontend copied to clipboard

Suggestion: Code styling

Open hesselberg opened this issue 5 years ago • 3 comments

Not sure where else to put this, so here goes.

It seems we don't have a set code style in place, and as of that, eslint, stylelint and Prettier (if installed) are all fighting to control what the formatting and code style should be.

I suggest we configure to use Airbnbs code style, and make it a requirement to install Prettier.

Thoughts?

hesselberg avatar Jun 17 '19 16:06 hesselberg

I think there is a code style in place right now?

  • eslint for javascript extending the airbnb and eslint recommended
  • stylelint for styles.

Doesnt it work?

jhavmoeller avatar Jun 17 '19 19:06 jhavmoeller

@jhavmoeller you're totally right, honestly I didn't check if it was there or not. My bad. That being said, I still have the issue of Prettier fighting over eslint/stylelint sometimes, not to mention Stylelint shouting and screaming at me.

Do we need stylelint, if everyone goes with Prettier and a default config for Prettier? I'm not sure which way is the best way to go

hesselberg avatar Jun 18 '19 07:06 hesselberg

I think we should look at for example how NUXT is using prettier to use the ESlint configs, and then just use prettier (remove stylelint). That way we have ESlint for JS and Prettier for (mostly) css. Anyone disagrees with this?

Dan9boi avatar Sep 02 '19 12:09 Dan9boi