code guidelines, home page, contributing

Chris Dias 2015-10-13 16:17:27 -07:00
parent 6fb8805543
commit eff1b137b2
3 changed files with 32 additions and 1 deletions

@ -1 +1,22 @@
@erich and team
##Events
* We use `Event<T>` which exposes events as a function to which you subscribe by calling that function. The return value is a disposable which removes the event subscription.
* We use `onDidVerbNoun?` and `onWillVerbNoun?`. For instance `onWillCloseSidebar`, `onDidiShutdownWorkbench`. The noun is optional if the scope provided enough identification, like `document#onDidChange` but `document#onWillDeleteLine`.
## Getter/Setter vs. Properties
* We use a property assignment when the assignment only alters that property but doesn't do anything else. We use a set/get method when value checking is performed, when events are send out, when other properties are updates etc.
## Promise - resolve vs. reject
* We don't use the reject path for expected conditions. For instance, when asking for the existence of a file a project resolves with a boolean instead rejecting. Similar, cancelling user input resolves with undefined instead or rejecting, `shell.showQuickPick:Promise`.
## Interface with I
* We *only* prefix interfaces with a uppercase `I` when it's supposed to be implemented by clients. That is it appears after the implements keyword. We don't use I-names when defining function signature or property bags.
## Prefix private member
* *All* private members of classes are prefixed with an `_`, such as `class Foo { private _bar;}`.

@ -9,6 +9,10 @@ If you simply want more information on using Code, please visit our [homepage](h
* [[Design Goals]]
* [[Issue Tracking Workflow]]
## Documentation
* [API](https://github.com/Microsoft/vscode-extensionbuilders/tree/master/docs/extensionAPI)
* [Extensions](https://github.com/Microsoft/vscode-extensionbuilders/tree/master/docs/extensions)
## Contributing to VS Code
* [[How to Contribute]]
* [[Coding Guidelines]]

@ -9,6 +9,12 @@ Don't feel bad if we can't reproduce the issue and ask for more information!
Before we can accept a pull request from you, you'll need to sign the Contributor License Agreement (CLA). See the "Legal" section of the [CONTRIBUTING.md guide in the repository](https://github.com/Microsoft/vscode/blob/master/CONTRIBUTING.md). That document also outlines the technical nuts and bolts of submitting a pull request. Be sure to follow our [[Coding Guidelines|Coding-Guidelines]].
```bash
git clone https://github.com/Microsoft/vscode
cd vscode
code .
```
## Suggestions
We're also interested in your feedback in future of Code. You can submit a suggestion or feature request through the issue tracker. To make this process more effective, we're asking that these include more information to help define them more clearly. Start by reading the [[Design Goals]].