Merge branch 'master' of https://github.com/atom/atom-shell
[platform/framework/web/crosswalk-tizen.git] / CONTRIBUTING.md
1 # Contributing to Electron
2
3 :+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
4
5 This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md).
6 By participating, you are expected to uphold this code. Please report unacceptable
7 behavior to atom@github.com.
8
9 The following is a set of guidelines for contributing to Electron.
10 These are just guidelines, not rules, use your best judgment and feel free to
11 propose changes to this document in a pull request.
12
13 ## Submitting Issues
14
15 * You can create an issue [here](https://github.com/electron/electron/issues/new),
16 but before doing that please read the notes below and include as many details as
17 possible with your report. If you can, please include:
18   * The version of Electron you are using
19   * The operating system you are using
20   * If applicable, what you were doing when the issue arose and what you
21   expected to happen
22 * Other things that will help resolve your issue:
23   * Screenshots and animated GIFs
24   * Error output that appears in your terminal, dev tools or as an alert
25   * Perform a [cursory search](https://github.com/electron/electron/issues?utf8=✓&q=is%3Aissue+)
26   to see if a similar issue has already been submitted
27
28 ## Submitting Pull Requests
29
30 * Include screenshots and animated GIFs in your pull request whenever possible.
31 * Follow the JavaScript, C++, and Python [coding style defined in docs](/docs/development/coding-style.md).
32 * Write documentation in [Markdown](https://daringfireball.net/projects/markdown).
33   See the [Documentation Styleguide](/docs/styleguide.md).
34 * Use short, present tense commit messages. See [Commit Message Styleguide](#git-commit-messages).
35
36 ## Styleguides
37
38 ### General Code
39
40 * End files with a newline.
41 * Place requires in the following order:
42   * Built in Node Modules (such as `path`)
43   * Built in Electron Modules (such as `ipc`, `app`)
44   * Local Modules (using relative paths)
45 * Place class properties in the following order:
46   * Class methods and properties (methods starting with a `@`)
47   * Instance methods and properties
48 * Avoid platform-dependent code:
49   * Use `path.join()` to concatenate filenames.
50   * Use `os.tmpdir()` rather than `/tmp` when you need to reference the
51     temporary directory.
52 * Using a plain `return` when returning explicitly at the end of a function.
53   * Not `return null`, `return undefined`, `null`, or `undefined`
54
55 ### Git Commit Messages
56
57 * Use the present tense ("Add feature" not "Added feature")
58 * Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
59 * Limit the first line to 72 characters or less
60 * Reference issues and pull requests liberally
61 * When only changing documentation, include `[ci skip]` in the commit description
62 * Consider starting the commit message with an applicable emoji:
63   * :art: `:art:` when improving the format/structure of the code
64   * :racehorse: `:racehorse:` when improving performance
65   * :non-potable_water: `:non-potable_water:` when plugging memory leaks
66   * :memo: `:memo:` when writing docs
67   * :penguin: `:penguin:` when fixing something on Linux
68   * :apple: `:apple:` when fixing something on Mac OS
69   * :checkered_flag: `:checkered_flag:` when fixing something on Windows
70   * :bug: `:bug:` when fixing a bug
71   * :fire: `:fire:` when removing code or files
72   * :green_heart: `:green_heart:` when fixing the CI build
73   * :white_check_mark: `:white_check_mark:` when adding tests
74   * :lock: `:lock:` when dealing with security
75   * :arrow_up: `:arrow_up:` when upgrading dependencies
76   * :arrow_down: `:arrow_down:` when downgrading dependencies
77   * :shirt: `:shirt:` when removing linter warnings