Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 1.46 KB

Contributing.md

File metadata and controls

18 lines (16 loc) · 1.46 KB

Contributing

Follow these steps to add a function to this library.

General

  1. Clone the repo
  2. Run npm install in the repo
  3. Find an issue to contribute to
  4. Create a branch for the issue

Adding a function

  1. Create a Gist to implement the function. The Gist should take the form of fn = function() { .... A previous implementation can be referenced to assist.
  2. View the raw Gist, and copy the path from the URL (everything after https://gist.githubusercontent.com/)
  3. Create a mapping from the function name to the Gist path in the DangerLinqFunction enum
  4. Create a mapping from the function enum value to the type signature of the function in the DangerLinqFunctionMapping object
  5. Add the overload for the enum value to the DangerLinq function
  6. Add some tests to test both the correct functionality of the function and the expected error conditions. These tests should be placed in a new file named using the test/<function>.spec.ts convention. See existing tests for reference. We are using Mocha and Chai for tests and assertions.
  7. Run npm test to ensure your tests are passing.
  8. Once tests are passing, create a PR from your issue branch to the main branch of DangerLinq!