ultra icon indicating copy to clipboard operation
ultra copied to clipboard

Update contributor guidelines

Open cdoremus opened this issue 2 years ago • 5 comments

As Ultra approaches the release of version 2, it seems like we need update our contributor guidelines to assure that code quality is maintained. We might want to start with the Deno style guide and add/subtract our own wrinkles

Please note the items you want to add or change in our contributor guidlines below.

cdoremus avatar May 03 '22 01:05 cdoremus

My particular pet peeve at this point is to make sure that all functions and class methods have typed arguments and return values. Besides helping someone reviewing the code, it also is a big aid in developing and updating unit tests.

cdoremus avatar May 03 '22 01:05 cdoremus

Linting should surely be picking all this up. Not sure about the return types though, as they're probably inferred by default. Maybe something we need to configure in the lint settings

deckchairlabs avatar May 03 '22 04:05 deckchairlabs

linter PR #119

deckchairlabs avatar May 03 '22 07:05 deckchairlabs

I went through the Deno Style Guide (DSG) and came up with ones that I think we should consider supporting (or not). If you comment on this, please number them as I have done below:

  1. Should we require JSDoc comments? If so, where (see DSG rec https://deno.land/manual/contributing/style_guide.md#use-jsdoc-for-exported-symbols)?
  2. Should we require unit tests? If so, always or in only certain instances (see DSG: https://deno.land/manual/contributing/style_guide.md#each-module-should-come-with-a-test-module)?
  3. Should we follow DSG rec: Exported functions: max 2 args, put the rest into an options object (https://deno.land/manual/contributing/style_guide.md#exported-functions-max-2-args-put-the-rest-into-an-options-object).
  4. Should we follow DSG rec: Export all interfaces that are used as parameters to an exported member (https://deno.land/manual/contributing/style_guide.md#export-all-interfaces-that-are-used-as-parameters-to-an-exported-member)
  5. Should we follow DSG rec: Top level functions should not use arrow syntax (https://deno.land/manual/contributing/style_guide.md#top-level-functions-should-not-use-arrow-syntax).
  6. Not from DSG, but something else I think we should consider: Should we require the prefixing of commits and/or PR names (something like https://www.conventionalcommits.org/en/v1.0.0/)?

cdoremus avatar May 03 '22 19:05 cdoremus

I personally think we should follow all the above. Would like to know how others feel about it @mashaal @dburles

deckchairlabs avatar May 04 '22 00:05 deckchairlabs

Fixed in PR #122

cdoremus avatar Aug 18 '22 07:08 cdoremus