Skip to content

Latest commit

 

History

History
84 lines (58 loc) · 2.89 KB

CONTRIBUTING.md

File metadata and controls

84 lines (58 loc) · 2.89 KB

Contributing

Before contributing, please read our code of conduct.

When contributing to this repository, please first discuss the change you wish to make via the issues, with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Setup

Make sure you have the correct version of Node installed. See the .nvmrc file for the current version for the project

git clone [email protected]:ViacomInc/broadcast-calendar.git
cd broadcast-calendar
npm install

Once you are setup, you may run any of the npm scripts available in the package.json.

Running Tests

You'll need to be running Postgres locally to be able to run the tests. The current default settings are in the POSTGRES_URI variable in the .env.test. You can override your local settings by adding a .env.test.local file and setting the variable there.

To run the tests you may run any of the following commands:

# runs all unit tests with test coverage
npm run test

Code Standards

Linting

These things should all be automated when committing and pushing. Descriptions here are just so you're aware.

We are mainly using typescript-eslint settings with a few overrides. See the .estlintrc.js file for details.

Formatting

These things should all be automated when committing and pushing. Descriptions here are just so you're aware.

We are using Prettier for javascript style formatting. Settings can be found in the .prettierrc file.

Programming style

Aside from trying to follow common Typescript best practices we have made an effort to follow a functional programming approach in our codebase, please help us continue with this pattern.

If you are new to Functional programming there is a lot of good documentation out there, but a good introduction is Eric Elliott's Functional Programming Series. You can start with What is Functional Programming and the more in depth Composing Software posts are really good.

If you'd like to take it to the next level, check out Professor Frisby's Mostly Adequate Guide to Functional Programming.

Pull Request Process

  1. Fork it
  2. Create your feature branch git checkout -b feature/my-new-feature
  3. Commit your changes
  4. Push to the branch git push origin feature/my-new-feature
  5. Create a new Pull Request
  6. Profit

Updating Documentation

Please update the respective README.md files with details of changes to the interface or code.