Skip to content

Commit

Permalink
Add some common objc nits to the style guide
Browse files Browse the repository at this point in the history
@nicklockwood @a2 @vjeux Want to add something else? (or remove something)
  • Loading branch information
tadeuzagallo committed Apr 24, 2015
1 parent 644d0e7 commit 5db06ac
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,27 @@ Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe

### Code

* Use semicolons;
#### General

* Add trailing commas,
* 2 spaces for indentation (no tabs)
* Prefer `'` over `"`
* `'use strict';`
* 80 character line length
* "Attractive"

#### JavaScript

* Use semicolons;
* `'use strict';`
* Prefer `'` over `"`
* Do not use the optional parameters of `setTimeout` and `setInterval`
* 80 character line length

#### Objective-C

* Space after `@property` declarations
* Brackets on *every* `if`, on the *same* line
* `- method`, `@interface`, and `@implementation` brackets on the following line
* *Try* to keep it around 80 characters line length (sometimes it's just not possible...)
* `*` operator goes with the variable name (e.g. `NSObject *variableName;`)

### Documentation

Expand Down

0 comments on commit 5db06ac

Please sign in to comment.