Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
268 lines (217 sloc) 20.2 KB

Contributing to express-boilerplate

This document merely outlines guidelines and best practices, not hard rules. Even improvements to these documents are appreciated. Contributions in all shapes and sizes are welcome, provided they add meaning to the project. These may come in the form of new features (🎉), bug fixes (preferably with corresponding unit / e2e tests), or improvements / optimizations to existing tests / code. For more details, please check the sections below:

Table of contents

  1. Code of conduct

  2. How to contribute

    1. Bugs
      1. Before submitting a bug report
      2. Good bug reports
    2. Enhancements
    3. Pull requests
  3. Code style guides

    1. Git commit messages
    2. JavaScript style guide
    3. Test styleguide
    4. Documentation styleguide
  4. Additional notes

    1. Labels

How to contribute

Bugs

This section guides you through submitting a bug report for express-boilerplate. Following these guidelines helps maintainers and the community understand your report, reproduce the behaviour, and find related reports. Before creating bug reports, please check this list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible. If you'd like, you can use this template to structure the information.

Before submitting a bug report
  • Check the debugging guide. You might be able to find the cause of the problem and fix things yourself. Most importantly, check if you can reproduce the problem in the latest version.
  • Perform a cursory search to see if the problem has already been reported. If it has, add a comment to the existing issue instead of opening a new one.
Good bug reports

Bugs are tracked as GitHub issues. Create an issue here and provide the following information.

  • Use a clear and descriptive title for the issue to identify the problem.

  • Describe the exact steps which reproduce the problem in as many details as possible.

  • Provide specific examples to demonstrate the steps. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use Markdown code blocks.

  • Describe the behaviour you observed after following the steps and point out what exactly is the problem with that behaviour.

  • Explain which behaviour you expected to see instead and why.

  • If the problem is related to performance, include a CPU profile capture and a screenshot with your report.

  • Provide more context by answering these questions:

    1. Can you reproduce the problem in safe mode?
    2. Did the problem start happening recently (e.g. after updating to a new version of express-boilerplate) or was this always a problem?
    3. If the problem started happening recently, can you reproduce the problem in an older version of express-boilerplate? What's the most recent version in which the problem doesn't happen? You can download older versions of express-boilerplate from the releases page.
    4. Can you reliably reproduce the issue? If not, provide details about how often the problem happens and under which conditions it normally happens.
    5. If the problem is related to working with files (e.g. opening and editing files), does the problem happen for all files and projects or only some? Does the problem happen only when working with local or remote files (e.g. on network drives), with files of a specific type (e.g. only JavaScript or Python files), with large files or files with very long lines, or with files in a specific encoding? Is there anything else special about the files you are using?
  • Include details about your configuration and environment:

    1. Which version of express-boilerplate are you using?
    2. What's the name and version of the OS you're using?
    3. Are you running express-boilerplate in a virtual machine? If so, which VM software are you using and which operating systems and versions are used for the host and the guest?

Enhancements

This section guides you through submitting an enhancement suggestion for express-boilerplate, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion, and find related suggestions. Before creating enhancement suggestions, please check this list as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please include as many details as possible. If you'd like, you can use this template to structure the information.

Before Submitting An Enhancement Suggestion
  • Check the debugging guide for tips — you might discover that the enhancement is already available. Also check if you're using the latest version of express-boilerplate.
  • Check if there's already a package which provides that enhancement.
  • Perform a cursory search to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
Good enhancement suggestions

Enhancement suggestions are tracked as GitHub issues. Create an issue on here

  • Use a clear and descriptive title for the issue to identify the suggestion.
  • Provide a step-by-step description of the suggested enhancement in as many details as possible.
  • Provide specific examples to demonstrate the steps. Include copy/pasteable snippets which you use in those examples, as Markdown code blocks.
  • Describe the current behaviour and explain which behaviour you expected to see instead and why.
  • Explain why this enhancement would be useful to most express-boilerplate users.
  • List some other boilerplates / generators where this enhancement exists.
  • Specify which version of express-boilerplate you're using.
  • Specify the name and version of the OS you're using.

Pull requests

  • Include screenshots and animated GIFs in your pull request whenever possible.
  • Follow the JavaScript style guide described in the ESLint config.
  • Include thoughtfully-worded, well-structured Mocha tests in the test folder. Run them using npm test. See the test style guide below.
  • Document new code based on the documentation style guide
  • End files with a newline.
  • Place requires in the following order:
    1. Built in Node Modules (such as path)
    2. Built in express-boilerplate and express-boilerplate Shell Modules (such as express-boilerplate, shell)
    3. Local Modules (using relative paths)
    4. Keep a blank line between each set of requires.
  • Avoid platform-dependent code:
    1. Use path.join() to concatenate filenames.
    2. Use os.tmpdir() rather than /tmp when you need to reference the temporary directory.
    3. Using a plain return when returning explicitly at the end of a function.
  • Not return null, return undefined, null, or undefined
  • For more details, see the pull request template

Code style guides

Git Commit Messages

  • Use the past tense ("Added feature" not "Add feature")
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
  • Limit the first line to 50 characters or less
  • Reference issues and pull requests liberally
  • When only changing documentation, include [ci skip] in the commit description
  • Consider starting the commit message with an applicable emoji:
    1. 🎨 :art: when improving the format/structure of the code
    2. 🐎 :racehorse: when improving performance
    3. 🚱 :non-potable_water: when plugging memory leaks
    4. 📝 :memo: when writing docs
    5. 🐧 :penguin: when fixing something on Linux
    6. 🍎 :apple: when fixing something on macOS
    7. 🏁 :checkered_flag: when fixing something on Windows
    8. 🐛 :bug: when fixing a bug
    9. 🔥 :fire: when removing code or files
    10. 💚 :green_heart: when fixing the CI build
    11. :white_check_mark: when adding tests
    12. 🔒 :lock: when dealing with security
    13. ⬆️ :arrow_up: when upgrading dependencies
    14. ⬇️ :arrow_down: when downgrading dependencies
    15. 👕 :shirt: when removing linter warnings

JavaScript style guide

Test style guide

  • No two it blocks must have the same description.
  • No two describe blocks must have the same description.
  • Tests related to one method or flow must be placed in one describe block.
Structural tests
  • These test look after project structure, and ensure that all configuration settings are in order.
  • Any changes to project build / lint configuration should be accompanied by corresponding changes in their tests.
  • These tests do not add to code test coverage metrics.
Unit tests
  • All tests in test/unit should test one function, and one function only.
  • Multiple it test blocks can test one function, but under different conditions.
  • Unit tests contribute to code test coverage metrics.
End to end (E2E / integration) tests
  • All tests in test/e2e should test a given branch in the functionality chain.
  • Since these chains may involve multiple function invocations within them, these tests are kept separate from unit tests.
  • These tests do not contribute toward code test coverage metrics.

Documentation style guide

  • Use JSDoc
  • Do run npm run docs locally to ensure that documentation generation is indeed valid.

Additional notes

Labels

This section lists the labels we use to help us track and manage issues and pull requests. Some are specific to express-boilerplate. GitHub search makes it easy to use labels for finding groups of issues or pull requests you're interested in. For example, you might be interested in open issues across express-boilerplate and all express-boilerplate-owned packages which are labelled as bugs, but still need to be reliably reproduced or perhaps open pull requests in express-boilerplate which haven't been reviewed yet. To help you find issues and pull requests, each label is listed with search links for finding open items with that label in express-boilerplate only and also across all express-boilerplate repositories. We encourage you to read about other search filters which will help you write more focused queries.

The labels are loosely grouped by their purpose, but it's not required that every issue have a label from every group or that an issue can't have more than one label from the same group. Please open an issue express-boilerplate if you have suggestions for new labels, and if you notice some labels are missing on some repositories, then please open an issue on that repository.

Type of Issue and Issue State

Label Issues Description
enhancement search Feature requests.
bug search Confirmed bugs or reports that are very likely to be bugs.
question search Questions more than bug reports or feature requests (e.g. how do I do X).
feedback search General feedback more than bug reports or feature requests.
help-wanted search The core team would appreciate help from the community in resolving these issues.
beginner search Less complex issues which would be good first issues to work on for users who want to contribute to Express-Boilerplate.
more-information-needed search More information needs to be collected about these problems or feature requests (e.g. steps to reproduce).
needs-reproduction search Likely bugs, but haven't been reliably reproduced.
blocked search Issues blocked on other issues.
duplicate search Issues which are duplicates of other issues, i.e. they have been reported before.
wontfix search The core team has decided not to fix these issues for now, either because they're working as intended or for some other reason.
invalid search Issues which aren't valid (e.g. user errors).

Topic Categories

Label name Issues Description
performance search Related to performance.
security search Related to security.
ui search Related to visual design.
auto-indent search Related to auto-indenting text.
encoding search Related to character encoding.
network search Related to network problems or working with remote files (e.g. on network drives).
git search Related to Git functionality (e.g. problems with gitignore files or with showing the correct file status).

Pull Request Labels

Label name Issues Description
work-in-progress search Pull requests which are still being worked on, more changes will follow.
needs-review search Pull requests which need code review, and approval from maintainers or core team.
under-review search Pull requests being reviewed by maintainers or core team.
requires-changes search Pull requests which need to be updated based on review comments and then reviewed again.
needs-testing search Pull requests which need manual testing.

This document has been heavily inspired from the atom contribution guide

You can’t perform that action at this time.