Vite: Style Guide

Created on 23 Oct 2020  路  1Comment  路  Source: vitejs/vite

Describe the solution you'd like
I think that we should try to implement a style guide to enforce cohesion amongst the files of this project. I have seen many different practices used inside of the code. Here are a couple of the things I would like to see inside of the style guide:

Obviously, this isn't enough for a complete style guide for every single thing, but it would be nice if the contributing guide included snippets of the important things to stay consistent with. Thanks for reading!

Most helpful comment

I personally don't find the level of strictness you suggest would really improve objective quality of the code - I can think of many cases where I'd have to work around them.

Some of them we can consider adopting:

  • Prefer function declarations for top level functions
  • JSDoc for exported symbols is a good thing to work on though (and it's not really a style rule).

>All comments

I personally don't find the level of strictness you suggest would really improve objective quality of the code - I can think of many cases where I'd have to work around them.

Some of them we can consider adopting:

  • Prefer function declarations for top level functions
  • JSDoc for exported symbols is a good thing to work on though (and it's not really a style rule).
Was this page helpful?
0 / 5 - 0 ratings