mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 18:24:09 +03:00
3.8 KiB
3.8 KiB
🎉 Contributing to Atom 🎉
These are just guidelines, not rules, use your best judgement and feel free to propose changes to this document in a pull request.
Issues
- Include screenshots and animated GIFs whenever possible, they are immensely helpful.
- Include the behavior you expected to happen and other places you've seen that behavior such as Emacs, vi, Xcode, etc.
- Check the Console app for stack traces to include if reporting a crash.
- Check the Dev tools (
alt-cmd-i
) for errors and stack traces to include.
Package Repositories
This is the repository for the core Atom editor only. Atom comes bundled with many packages and themes that are stored in other repos under the atom org such as tabs, find-and-replace, language-javascript, and atom-light-ui.
If you think you know which package is causing the issue you are reporting, feel free to open up the issue in that specific repository instead. When in doubt just open the issue here but be aware that it may get closed here and reopened in the proper package's repository.
Pull Requests
- Include screenshots and animated GIFs whenever possible.
- Follow the CoffeeScript, JavaScript, and CSS styleguides
- Include thoughtfully worded Jasmine specs
- Avoid placing files in
vendor
. 3rd-party packages should be added as apackage.json
dependency. - Files end with a newline.
- Requires should be in the following order:
- Built in Node Modules (such as
path
) - Built in Atom and Atom Shell Modules (such as
atom
,shell
) - Local Modules (using relative paths)
- Built in Node Modules (such as
- Class variables and methods should be in the following order:
- Class methods (methods starting with a
@
) - Instance methods
- Class methods (methods starting with a
- Beware of platform differences
- Use
require('atom').fs.getHomeDirectory()
to get the home directory. - Use
path.join()
to concatenate filenames. - Temporary directory is not
/tmp
on Windows, useos.tmpdir()
when possible
- Use
Git Commit Messages
- Use the present tense
- Reference issues and pull requests liberally
- Consider starting the commit message with an applicable emoji:
- 💄 when improving the format/structure of the code
- 🐎 when improving performance
- 🚱 when plugging memory leaks
- 📝 when writing docs
CoffeeScript Styleguide
- Set parameter defaults without spaces around the equal sign
clear = (count=1) ->
instead ofclear = (count = 1) ->
Documentation Styleguide
- Use TomDoc.
- Use Markdown.
- Reference classes with
{ClassName}
style notation. - Reference methods with
{ClassName.methodName}
style notation. - Delegate to comments elsewhere with
{Delegates to: ClassName.methodName}
style notation.
Example
# Public: Disable the package with the given name.
#
# This method emits multiple events:
#
# * `package-will-be-disabled` - before the package is disabled.
# * `package-disabled` - after the package is disabled.
#
# name - The {String} name of the package to disable.
# options - The {Object} with disable options (default: {}):
# :trackTime - `true` to track the amount of time disabling took.
# :ignoreErrors - `true` to catch and ignore errors thrown.
# callback - The {Function} to call after the package has been disabled.
#
# Returns `undefined`.
disablePackage: (name, options, callback) ->