Skip to content
Permalink
Browse files

Update CONTRIBUTING.md

  • Loading branch information...
heiskr committed Oct 25, 2019
1 parent dc7c778 commit cd3cc6cca769abecbd6526d6dddd2280124dc312
Showing with 15 additions and 27 deletions.
  1. +15 −27 .github/CONTRIBUTING.md
@@ -2,15 +2,19 @@

Thank you for contributing to Sagefy! This document covers basic guidelines for contributing to Sagefy.

Not sure where to start our help out? We have some ideas in our [Want to Help](https://docs.sagefy.org/want-to-help) guide.
Not sure where to help out? We have some ideas in our [Want to Help](https://docs.sagefy.org/want-to-help) guide.

To start up your local development environment, please read our [Setup](https://docs.sagefy.org/setup) doc.
Reach out to support@sagefy.org for help!

## Content

Create and edit content through the discussion section within the Sagefy interface. You will want to get familiar with the [Data Structure](https://docs.sagefy.org/cards-subjects).
Create and edit content through the discussion section within the Sagefy interface. You will want to get familiar with [Cards & Subjects](https://docs.sagefy.org/cards-subjects). More docs coming soon!

## Pull Request Checklist
## Code

To start up your local development environment, please read our [Setup](https://docs.sagefy.org/setup) doc. You may also want to read [Cards & Subjects](https://docs.sagefy.org/cards-subjects), [User Stories](https://docs.sagefy.org/user-stories), [Technology Stack](https://docs.sagefy.org/technology-stack), and [Technical Architecture](https://docs.sagefy.org/technical-architecture).

### Pull Request Checklist

For each pull request:

@@ -21,22 +25,22 @@ For each pull request:
- Write at least one test per function.
- Let another person review the code.

## Global Code Styling
### Global Code Styling

- Two spaces per tab.
- No extra whitespace at the ends of lines.
- A single line break at the end of the file.
- A maximum of 80 characters per line.

## Naming Conventions
### Naming Conventions

- **Underscores**: Database names
- **Camelcase**: JavaScript
- **Dashes**: Filenames, URLs, CSS, HTML attributes
- _Create, Edit, Delete_: URLs, Page names, Attributes, User copy
- _Create, Update, Delete_: Postgres, GraphQL

## Database
### Database

- Table names are singular.
- Field names are singular, unless an array.
@@ -49,35 +53,19 @@ For each pull request:
- Use `kind` for kind or type.
- Use third normal form unless there's no query requirement.

## JavaScript
### JavaScript

- See [Eslint](http://www.eslint.org/) for basic JavaScript formatting.

## Styles
### Styles

- Mobile is the first and default styling. Use `@media (min-width...)` and never use `@media (max-width...)`.
- Explain the necessity of each additional styling.

## HTML
### HTML

- The least markup possible.

## Writing Tests

Basic guidelines for automated tests:

**1) Tests what matters**

It's too easy to get to get caught up in isolating everything for unit testing, writing a sea of esoteric tests, arguing over what type of test a test is, and gaming the coverage tool. Instead, simply tests what matters, and don't test what doesn't. If you don't care that the test fails, then don't write it.

**2) Use the context**

If it needs to work under a variety of conditions, isolate it. If it has a hard dependency, include it. If it needs to happen in less than 200 ms, ensure that it does. Write the test using the writing styles and tools appropriate for what matters.

**3) If something becomes an issue, write a test for it**

We don't want issues to recur. That also means we can write fewer tests up-front if we know new tests will be created as needed later.

## Other Documentation
### Other Documentation

- Use [Markdown](https://daringfireball.net/projects/markdown/) when possible as the default.

0 comments on commit cd3cc6c

Please sign in to comment.
You can’t perform that action at this time.