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 (
Table of contents
How to contribute
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:
- Can you reproduce the problem in safe mode?
- Did the problem start happening recently (e.g. after updating to a new version of express-boilerplate) or was this always a problem?
- 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.
- Can you reliably reproduce the issue? If not, provide details about how often the problem happens and under which conditions it normally happens.
Include details about your configuration and environment:
- Which version of express-boilerplate are you using?
- What's the name and version of the OS you're using?
- 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?
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.
- Include screenshots and animated GIFs in your pull request whenever possible.
- Include thoughtfully-worded, well-structured Mocha tests in the
testfolder. 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:
- Built in Node Modules (such as path)
- Built in express-boilerplate and express-boilerplate Shell Modules (such as express-boilerplate, shell)
- Local Modules (using relative paths)
- Keep a blank line between each set of requires.
- Avoid platform-dependent code:
- Use path.join() to concatenate filenames.
- Use os.tmpdir() rather than /tmp when you need to reference the temporary directory.
- 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:
:art:when improving the format/structure of the code
:racehorse:when improving performance
:non-potable_water:when plugging memory leaks
:memo:when writing docs
:penguin:when fixing something on Linux
:apple:when fixing something on macOS
:checkered_flag:when fixing something on Windows
:bug:when fixing a bug
:fire:when removing code or files
:green_heart:when fixing the CI build
:white_check_mark:when adding tests
:lock:when dealing with security
:arrow_up:when upgrading dependencies
:arrow_down:when downgrading dependencies
:shirt:when removing linter warnings
Test style guide
- No two
itblocks must have the same description.
- No two
describeblocks must have the same description.
- Tests related to one method or flow must be placed in one
- 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.
- All tests in
test/unitshould test one function, and one function only.
ittest 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/e2eshould 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 docslocally to ensure that documentation generation is indeed valid.
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
||search||Confirmed bugs or reports that are very likely to be bugs.|
||search||Questions more than bug reports or feature requests (e.g. how do I do X).|
||search||General feedback more than bug reports or feature requests.|
||search||The core team would appreciate help from the community in resolving these issues.|
||search||Less complex issues which would be good first issues to work on for users who want to contribute to Express-Boilerplate.|
||search||More information needs to be collected about these problems or feature requests (e.g. steps to reproduce).|
||search||Likely bugs, but haven't been reliably reproduced.|
||search||Issues blocked on other issues.|
||search||Issues which are duplicates of other issues, i.e. they have been reported before.|
||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.|
||search||Issues which aren't valid (e.g. user errors).|
||search||Related to performance.|
||search||Related to security.|
||search||Related to visual design.|
||search||Related to auto-indenting text.|
||search||Related to character encoding.|
||search||Related to network problems or working with remote files (e.g. on network drives).|
||search||Related to Git functionality (e.g. problems with gitignore files or with showing the correct file status).|
Pull Request Labels
||search||Pull requests which are still being worked on, more changes will follow.|
||search||Pull requests which need code review, and approval from maintainers or core team.|
||search||Pull requests being reviewed by maintainers or core team.|
||search||Pull requests which need to be updated based on review comments and then reviewed again.|
||search||Pull requests which need manual testing.|
This document has been heavily inspired from the atom contribution guide