Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some common objc nits to the style guide #1006

Merged
merged 1 commit into from
Apr 30, 2015
Merged

Conversation

tadeuzagallo
Copy link
Contributor

@nicklockwood @a2 @vjeux Want to add something else? (or remove something)

@nicklockwood @a2 @vjeux Want to add something else? (or remove something)
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 24, 2015
@brentvatne
Copy link
Collaborator

@tadeuzagallo - to JS, we could add something like:

Leave a trailing comma after the list item in object literals
Use object destructuring assignment where possible

For objc, do you have a preference on using [x setVar:y] vs x.var = y? Might be worth picking one to avoid any future bike shedding.

@nicklockwood
Copy link
Contributor

It's difficult to know what level of detail to go into with something like this. We do have very specific style guidelines for Objective-C code, but they'd probably run to a dozen pages if we mentioned everything!

The [x setVar:y] vs x.var = y is a good one (we prefer the latter, but only for @properties, not methods).

Besides that, may as well merge this as is and we can expand on it later as and when issues arise.

nicklockwood added a commit that referenced this pull request Apr 30, 2015
Add some common objc nits to the style guide
@nicklockwood nicklockwood merged commit 7f46f7d into master Apr 30, 2015
@vjeux vjeux deleted the objc-style-guide branch May 22, 2015 17:19
ayushjainrksh pushed a commit to MLH-Fellowship/react-native that referenced this pull request Jul 2, 2020
dannyvv pushed a commit to dannyvv/react-native that referenced this pull request Mar 28, 2022
…-fixes

Cherry pick changes to fix building rn-tester app for android from main to 0.64-stable
facebook-github-bot pushed a commit that referenced this pull request Oct 4, 2022
Summary:
This is a partial rollback of 07c0d539bdb3a248762d0a06fd3f622b278a7ecb.

X-link: facebook/yoga#1006

Reviewed By: yungsters

Differential Revision: D40032544

Pulled By: yungsters

fbshipit-source-id: 9ef9b80672eced86a98cfae66c81710bd3ee6f9b
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
This is a partial rollback of 07c0d539bdb3a248762d0a06fd3f622b278a7ecb.

X-link: facebook/yoga#1006

Reviewed By: yungsters

Differential Revision: D40032544

Pulled By: yungsters

fbshipit-source-id: 9ef9b80672eced86a98cfae66c81710bd3ee6f9b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants