Skip to content

Commit

Permalink
Issue #1474 - added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
magsout committed May 14, 2017
1 parent 8cf4bff commit 8909906
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions docs/pr-coding-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,34 @@ All code contributions should come in the form of a pull request, as a topic bra

```bash
# makes sure, you are on the master branch
git checkout master
git checkout master

# if you are SURE your fork is up-to-date
git pull origin master
# OR

# OR
# if you are NOT SURE your fork is up-to-date
git pull upstream master

# creates new branch
git checkout -b issues/NumberOfIssue/VersionOfPR
```

5. Create your patch; commit your changes. Referencing the issue number you're working on from the message is recommended.
> Note: Please keep the title under 50 chars. If you'd like to provide more information, just add the details to the commit body.

```bash
# check for changed files
git status
# add files to commit, e.g. as following
git add file.js foldername/foldername2/file2.js
git add file.js foldername/foldername2/file2.js
# add commit message including issue number
git commit -m 'Issue #NumberOfIssue - Fixes broken layout on mobile browsers'
```

6. Push your branch to GitHub:

`git push origin issues/NumberOfIssue/VersionOfPR`
Expand Down Expand Up @@ -144,10 +144,18 @@ We do not use frameworks. However we use libraries, such suitcss-components-grid
### Javascript
The js folder contains two subfolders: `lib` contains all project source files and `vendor` contains all third party libraries. The files out of the two sub folders contain the compiled source code.
The js folder contains two sub folders: `lib` contains all project source files and `vendor` contains all third party libraries. The files out of the two sub folders contain the compiled source code.
> Note: All code changes should be made to the files in `lib`
#### Linting
For the consistency of our codebase, we use eslint with these rules: https://github.com/webcompat/webcompat.com/blob/master/.eslintrc. We also use Prettier for formatting our code. We have set up two recipes to check and fixe the codebase.
`npm run lint` check all JavaScript files and display the resulting errors. If you get errors, you have two possibilities. You can correct yourself or you can run `npm run fix` which use Prettier to format the code.
In order to avoid errors during a Pull Request, `npm run lint` will be executed before each commit.
@@something to write by miketaylr@@
Expand Down

0 comments on commit 8909906

Please sign in to comment.