• Stars
    star
    111
  • Rank 314,510 (Top 7 %)
  • Language
  • License
    Other
  • Created over 8 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A brief guide to being an effective open source contributor.

Guide to Idiomatic Contributing

Welcome! The fact that you're here means you want to start contributing to open source projects, or you want learn how to be a better contributor. We applaud you for that, and hope you get the most out of this guide. But if you read no further than this section, here are the most important things to take away:

  • Idiomatic contributing has more to do with relationships and communication than it does with code
  • Conventions are often used in projects to make them easier to maintain. The more popular the project, the more difficult it is to "please everyone". You don't need to like a project's conventions, but it's important to respect them anyway.

In other words: Be considerate of a projects conventions, and kind to its humans, and you will go much further in your career as a developer.

Table of contents

The following sections are planned. Any contributions or shared wisdom would be appreciated!




separator




What to expect from this guide

This guide won't teach you how to use git, or GitHub, or any specific frameworks or tools. There are many other resources available for those things. This guide isn't a replacement for a project's contributing.md file either. If you find this guide to be useful, we encourage you to link to it from your project's readme and contributing.md files.

If successful, this guide should achieve the following, depending on your level of experience:

  • new to open source: As the saying goes, "competence breeds confidence". If you've never contributed to an open source project before, this guide will give you the information you need to get started. Confidence will arrive with experience.
  • experienced: If you're an experienced contributor, hopefully this guide will help you become a more effective contributor, or at very least give you ideas to use in your own contributing guides.



separator




Contributing 101

What is contributing?

There are many ways to contribute to an open source project, including:

  • Updating or correcting documentation
  • Feature requests
  • Submitting bug reports

But you aren't limited to these things. Use your imagination! If you like a project, and you see something that can or should be improved, then you have an opportunity (but not an obligation) to contribute.

Why should I contribute?

Regardless of the details, being an effective contributor means that you're adding value to a project.

Here are just a few of the advantages of adding value to a project:

  • you gain the appreciation and respect of the project's maintainers and community
  • you gain valuable experience, and learn valuable collaboration skills
  • you get noticed by job recruiters
  • you become more attractive as a candidate to potential employers
  • increase "street cred" with peers
  • you might even make some new friends along the way

Getting familiarized with a project

Before you attempt to contribute to a project, take a moment to get familiarized with it. In most cases you can learn all you need to know within a couple of minutes.

Required

The following items are a pre-requisite for contributing to any project. Avoid creating issues or doing pull requests until you've done all of these things:

  • Review the readme: Oftentimes a project readme has links to documentation, advice on creating issues or bug reports, and so on.
  • Read contributing guidelines: look for a contributing.md file and, if one exists, read it in its entirety before creating issues or doing a pull request. Typically this is in the root of the project, but it might be in .github/contributing.md
  • Search issues: Before creating bug reports, feature requests, or submitting issues of any kind, you should always search for existing issues (closed or open) that address the same thing.
  • Search google (or whatever search engine you prefer): Oftentimes a quick google search will turn up information that won't show up in a GitHub search. This reminds me of something I personally experienced recently. I was about to create an issue on a project I use to ask a question about a feature. It seemed unlikely that other users were using this project for the same thing as me, so I almost didn't do a search for existing issues first. I went ahead and searched google anyway, and as it turned out, not only did other users wonder about the same thing, but there were several complete blog posts dedicated to answering the question I had.

Recommended

  • Review unit tests: one of the best ways to get familiarized with a project is through its unit tests. Of course, this depends on the type of project, complexity, test coverage, and so on. But when applicable, test are often a good source of insight.
  • Get familiarized with the code: If the codebase is small, and you're familiar with the language, take a moment to review the code to see if you find anything that can be improved. If the codebase is large, this provides even more opportunity to add value. You might be able to provide domain expertise or fixes for specific areas. If you want to add value to a big project, don't shy away from contributing because you aren't sure where to start with the code. Instead, if the project's contributing guide doesn't cover this already, create an issue and ask the maintainers to point you in the right direction.
  • Ask questions: Depending the project type and size, it might be good to start by searching google to find anwers to your questions. Then, check to see if the project uses gitter or has a slack channel, or something similar. Also visit stackoverflow and do a search to see if others have already asked the same question. As a last resort, create an issue on the project's GitHub repository.



separator




Effective Bug Reports

Prerequisites

The most important detail to consider when creating a bug report is whether or not you should create one at all.

Do research first

Did you research existing issues, closed and open, to see if other users have experienced (and potentially already solved) the same issue you're having?

Also make sure you search Google and StackOverflow to see if users outside of the GitHub community have discussed the issue.

Describe the problem, don't jump to conclusions

Another maintainer and I were discussing this topic recently. We wondered how many issues we've handled that were created with the word "bug" in the title, or something along those lines that ended up being user error or were definitely not a bug. This is a guesstimate, but I think it's conservative to say that only 1 out of 10 reports with "bug" in the title has actually ended up being a bug.

Even if you determine that what you're experiencing is absolutely a bug, it's always better to use a title and wording that describes the actual problem you're having, instead of describing it as a bug. Labeling an issue as a bug is better left to the project's maintainers.

However, the exception to the rule is when a project requires labels to be added to issue titles, and the only suitable label is "bug". In these situations, it's better to follow the rules.

4 Important Details

When a bug report is warranted, the vast majority of bug reports should include the following four bits of information:

  1. version
  2. description
  3. error messages
  4. code

Rationale

The easier you make it for a maintainter or members of the community to react, the more likely it is for them to react quickly.

Like you, maintainers have to make decisions about where to spend their time. Not only within a given project, but oftentimes across multiple projects. If you're experiencing a bug and you want to make a report, bug reports that are clearly described and organized are much more likely to get addressed by the maintainers or member of the community.

Providing these details up front will make everyone happy. If you don't provide these details, maintainers will have to ask you for them, which can be annoying for experienced maintainers who have had to ask for these crucial details many times.

The details

Always include the following essential details in every bug report:

  1. version: what version of X were you using when you experienced the bug?
  2. description: clear description of the bug, and minimum steps to reproduce it.
  3. error messages: paste any error messages into the issue or a github gist, and be sure to wrap the error messages in gfm code blocks.
  4. code: paste any code necessary for reproducing the bug into the issue or a github gist, and be sure to wrap the code in gfm code blocks.

Let's review the details in more... detail.

1. version

Always, always, always provide the version you're using in bug reports. This can't be overstated.

(No matter how long you've been contributing to a project, or how familiar you are with the code and core team, every time a bug is reported, the first thing a core team member wants to know is: "What version were you using when you experienced the bug?". Core team members even ask one another for this detail when debugging. The bug you're experience may have alreay been fixed in a patch.)

2. description

Decribe the bug with all of the details necessary for others to understand what's happening, including:

  • Expected behavior and actual behavior.
  • Steps to reproduce the problem.

3. error message

# paste any error messages here

See GitHub's guide to Creating and highlighting code blocks for more details.

4. code

// paste your code into a GFM code block like this. Be sure to use the 
// appropriate language label after the first code "fence"

See GitHub's guide to Creating and highlighting code blocks for more details.

Effective feature requests

Before submitting a feature request, try to get familiarized with the project. Find out if the project has certain goals, or guidelines that describe how feature requests should be made.

Effective pull requests

WIP

It's not unusual for the maintainers of a project to ask you to make changes to your pull request. Here are some common reasons:

  • Code formatting doesn't following the project's stated or established standards
  • Code isn't commented according to the project's stated or established standards
  • Grammatical mistakes or typos
  • Missing unit tests

Whatever the reason, it's up to you to decide whether or not to make the changes, and it's up to the maintainers to decide whether or not to merge your pull request.

Effective contributing

Contributing code

TODO

Contributing documentation

TODO

Other ways to contribute

Adding value takes time

Depending on your personal goals, keep in mind that it might take longer and require more time committment to add value to a larger project than it would for a small project.

If you want to become a respected and valuable member of a popular project, consider time investment made by the current maintainers and the project's creator. It's reasonable to expect that it will take some time to become familiar with the project's codebase. Review the project's unit tests. Read the docs. Try to understand the project's goals and direction, and try to get to know the current maintainers and community.

Show your support

Sometimes we find a project we like but just don't have time to contribute. That's okay, there are other ways to show support:

  • Star the project
  • Tweet about it
  • Tell your friends
  • Do a talk about the project at local meetups

Show your appreciation

Maintainers are people too. You can make someone's day, and even inspire and motivate them to keep doing a great job, by letting them know you appreciate their work. If you use a library in one of your own projects, let the author know you care:

  • Add a "shout out" with a link to the project on your project's readme
  • Say "thanks" on twitter



separator




Code of conduct and beyond

Do

  • Politely and respectfully ask for clarification if you don't understand or agree with a maintainer's answers or feedback.
  • Remember that humor is very difficult to convey in written form (I seem to fail on this one a lot)
  • Ask for feedback and code reviews from peers. Collaboration leads to faster solutions, shows humility, and results in mutual respect.
  • Try to build lasting relationships

Don't

  • Ask if a project is still being maintained. To a maintainer, this is amongst the most insulting questions you can ask. Especially in light of the fact that a written library or well-maintained project will require far less activity. A lot of activity is not always a sign of health.
  • Ask "Why hasn't this been fixed?" on a project's GitHub issues. Questions like this are extremely insulting to a project's maintainers. Remember that FOSS (free and open source software) is, in fact, free and open source. Sometimes contributors do so on their own spare time, other times companies subsidize time spent on FOSS. But in both cases the software is free to you, and you are not entitled to an answer to this question.
  • Tell other users they are "bikeshedding" (or other similar tactics) to force an end to conversations on pull requests or issues. Telling another user that they are bikeshedding is equivalent to telling them: "What you're saying is not important to me", which is contentious at best, offensive at worst. Instead, whether you are a user or a maintainer, if you feel like you're "finished" with a conversation that users seem interested in continuing, it's better to avoid commenting at all. Or, if you feel it's necessary to comment, try to bring the discussion back on topic by restating goals or reminding users what's important about the issue at hand.
  • Email maintainers directly with questions about a project, requests for help, or suggestions for a project. Once you've established a relationship with the maintainers this might be okay, but it's frowned upon otherwise. Even once you establish a relationship, it's often better to have these discussions in the open, so that other community members can benefit from the dialog.

TODO:

  • dealing with rejection (Sometimes we try to contribute to a project and it doesn’t work out)
  • attribution and respecting copyrights



separator




Resources

Resources mentioned in this guide:

Related information:




separator




About

Contributors

If you contribute to this project, thank you! Please add your name to the following list:

Blake Embrey

[your name here!]

Contributing to this project

Please visit the contributing guide to learn more about contributing to this project.

Authors

Jon Schlinkert

Brian Woodward

License

Released under Creative Commons. Copyright © 2016, Jon Schlinkert.

More Repositories

1

remarkable

Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use https://github.com/breakdance/breakdance for HTML-to-markdown conversion. Use https://github.com/jonschlinkert/markdown-toc to generate a table of contents.
JavaScript
5,745
star
2

gray-matter

Smarter YAML front matter parser, used by metalsmith, Gatsby, Netlify, Assemble, mapbox-gl, phenomic, vuejs vitepress, TinaCMS, Shopify Polaris, Ant Design, Astro, hashicorp, garden, slidev, saber, sourcegraph, and many others. Simple to use, and battle tested. Parses YAML by default but can also parse JSON Front Matter, Coffee Front Matter, TOML Front Matter, and has support for custom parsers. Please follow gray-matter's author: https://github.com/jonschlinkert
JavaScript
3,863
star
3

markdown-toc

API and CLI for generating a markdown TOC (table of contents) for a README or any markdown files. Uses Remarkable to parse markdown. Used by NASA/openmct, Prisma, Joi, Mocha, Sass, Prettier, Orbit DB, FormatJS, Raneto, hapijs/code, webpack-flow, docusaurus, release-it, ts-loader, json-server, reactfire, bunyan, husky, react-easy-state, react-snap, chakra-ui, carbon, alfresco, repolinter, Assemble, Verb, and thousands of other projects.
JavaScript
1,508
star
4

gulp-htmlmin

Minify HTML
HTML
730
star
5

sublime-markdown-extended

Top 100 Sublime Text plugin! Markdown syntax highlighter for Sublime Text, with extended support for GFM fenced code blocks, with language-specific syntax highlighting. YAML Front Matter. Works with ST2/ST3. Goes great with Assemble.
658
star
6

maintainers-guide-to-staying-positive

Don't let the trolls get you down! Use this as a reference to avoid open-source burnout and keep doing what you love: writing code! Contributions and any kind of improvements are very welcome!
625
star
7

sublime-monokai-extended

Extends Monokai from Soda with additional syntax highlighting for Markdown, LESS, HTML, Handlebars and more.
511
star
8

kind-of

Get the native JavaScript type of a value, fast. Used by superstruct, micromatch and many others!
JavaScript
334
star
9

clone-deep

Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. Used by superstruct, merge-deep, and many others!
JavaScript
305
star
10

set-value

Set nested properties on an object using dot-notation.
JavaScript
261
star
11

is-number

JavaScript/Node.js utility. Returns `true` if the value is a number or string number. Useful for checking regex match results, user input, parsed strings, etc.
JavaScript
256
star
12

get-value

Use property paths (`a.b.c`) get a nested value from an object.
JavaScript
229
star
13

word-wrap

Wrap words to a specified length.
JavaScript
194
star
14

randomatic

Easily generate random strings like passwords, with simple options for specifying a length and for using patterns of numeric, alpha-numeric, alphabetical, special or custom characters. (the original "generate-password")
JavaScript
178
star
15

data-store

Easily get, set and persist config data. Fast. Supports dot-notation in keys. No dependencies.
JavaScript
158
star
16

is-plain-object

Returns true if the given value is an object created by the Object constructor.
HTML
147
star
17

guide-to-staying-productive

If you're looking for ways to stay motivated and focused, while still having fun, this guide is for you! Contributions and any kind of improvements are very welcome!
136
star
18

pretty

Sensible presets and some tweaks for beautifying HTML with js-beautify according to my preferences.
JavaScript
135
star
19

parse-github-url

Parse a Github URL into an object. Supports a wide variety of GitHub URL formats.
JavaScript
117
star
20

time-stamp

Get a formatted timestamp. Used in gulp, assemble, generate, and many others.
JavaScript
112
star
21

merge-deep

Recursively merge values in a JavaScript object.
JavaScript
111
star
22

strip-comments

Strip block comments or line comments from JavaScript code.
JavaScript
105
star
23

isobject

Is the value an object, and not an array or null?
JavaScript
101
star
24

normalize-path

Normalize file path slashes to be unix-like forward slashes. Used by chokidar, anymatch, and many others!
JavaScript
99
star
25

gists

Methods for working with the GitHub Gist API. Node.js/JavaScript
JavaScript
97
star
26

copy

Copy files using glob patterns. Sync, async, promise or streams. (node.js utility)
JavaScript
93
star
27

git-branch

Get the current branch for a local git repository
JavaScript
91
star
28

dashify

Convert a string to a dash-separated string (kebab case). Works with camelcase, pascalcase, space-separated, etc.
JavaScript
86
star
29

vertical-rhythm

Put some typographical vertical rhythm in your CSS. LESS, Stylus and SCSS/SASS versions included.
CSS
85
star
30

write

Write data to the file system, creating any intermediate directories if they don't already exist. Used by flat-cache and many others!
JavaScript
82
star
31

window-size

Reliable way to to get the height and width of the terminal/console in a node.js environment.
JavaScript
80
star
32

object.omit

Return a copy of an object without the given keys.
JavaScript
79
star
33

mixin-deep

Deeply mix the properties of objects into the first object, while also mixing-in child objects.
JavaScript
79
star
34

assign-deep

Deeply assign the enumerable properties of source objects to a destination object.
JavaScript
78
star
35

grunt-prettify

Grunt plugin for beautifying HTML. Lots of options so that you can format/beautify the generated HTML the way you want it.
JavaScript
77
star
36

template-helpers

Generic JavaScript helpers that can be used with any template engine. Handlebars, Lo-Dash, Underscore, or any engine that supports helper functions.
JavaScript
75
star
37

omit-deep

Recursively omit specified keys from an object.
JavaScript
73
star
38

omit-empty

Recursively omit empty properties from an object. Omits empty objects, arrays, strings, and optionally zero. Similar results to what you would expect with `compact` for arrays.
JavaScript
73
star
39

array-sort

Fast and powerful array sorting. Sort an array of objects by one or more properties. Any number of nested properties or custom comparison functions may be used.
JavaScript
72
star
40

dry

Dry is a new template engine and language, and is a superset of Shopify's Liquid, with first-class support for advanced inheritance features, and more. From the creators of Enquirer, Assemble, Remarkable, and Micromatch.
JavaScript
69
star
41

grunt-refactor

Grunt tasks for re-factoring code.
JavaScript
65
star
42

parse-comments

Parse JavaScript code comments. Works with block and line comments, and should work with CSS, LESS, SASS, or any language with the same comment formats.
JavaScript
64
star
43

utils

Fast, generic JavaScript/node.js utility functions.
JavaScript
61
star
44

github-base

Simple, opinionated node.js interface for creating basic apps with the GitHub API.
JavaScript
60
star
45

arr-flatten

Recursively flatten an array or arrays. This is the fastest implementation of array flatten.
JavaScript
60
star
46

templates

System for creating and managing view collections, rendering, engines, routes and more. See the "dev" branch for most recent updates.
JavaScript
60
star
47

parse-gitignore

Parse a gitignore file into an array of patterns. Comments and empty lines are stripped.
JavaScript
59
star
48

parse-git-config

Parse `.git/config` into a JavaScript object. sync or async.
JavaScript
58
star
49

array-unique

Return an array free of duplicate values. Very fast implementation.
JavaScript
58
star
50

sublime-swig

Swig template syntax highlighting for Sublime Text.
58
star
51

to-regex

Generate a regex from a string or array of strings.
JavaScript
56
star
52

split-string

Split a string on a given character or characters, with support for escaping.
JavaScript
55
star
53

fill-range

Fill in a range of numbers or letters, positive or negative, optionally passing an increment or multiplier to use.
JavaScript
54
star
54

cache-base

Basic object store with methods like get/set/extend/omit
JavaScript
54
star
55

template

Render templates from any engine. Make custom template types, use layouts on pages, partials or any custom template type, custom delimiters, helpers, middleware, routes, loaders, and lots more. Powers Assemble v0.6.0, Verb v0.3.0 and your application.
JavaScript
54
star
56

align-text

Align the text in a string.
JavaScript
51
star
57

grunt-fixmyjs

Automatically fix js-hint errors.
JavaScript
51
star
58

lazy-cache

Cache requires to be lazy-loaded when needed. Uses node's own require system with tried and true, plain-vanilla JavaScript getters.
JavaScript
51
star
59

gulp-prettify

Prettify HTML.
HTML
50
star
60

exponential-moving-average

Calculate an exponential moving average from an array of numbers.
JavaScript
50
star
61

pretty-time

Easily format the time from node.js `process.hrtime`. Works with timescales ranging from weeks to nanoseconds.
JavaScript
50
star
62

is-windows

Returns true if the platform is Windows (and Cygwin or MSYS/MinGW for unit tests)
JavaScript
48
star
63

extract-comments

Extract JavaScript code comments from a string or glob of files.
JavaScript
46
star
64

repeat-string

Repeat the given string n times. Fastest implementation for repeating a string (2x faster than the native method)
JavaScript
45
star
65

arr-diff

Returns an array with only the unique values from all given arrays using strict equality for comparisons.
JavaScript
44
star
66

pad-left

Left pad a string with zeros or a specified string. Fastest implementation.
JavaScript
44
star
67

unixify

Convert a windows file path to a unix-style file path.
JavaScript
42
star
68

object.pick

(object pick) returns a filtered copy of an object with only the specified keys, exactly like `pick` from lo-dash / underscore.
JavaScript
42
star
69

delete-empty

Recursively delete all empty folders in a directory and child directories.
JavaScript
41
star
70

handlebars-delimiters

Custom delimiters, for Handlebars templates.
JavaScript
41
star
71

write-yaml

Basic node.js utility for converting JSON to YAML and writing formatting YAML files to disk.
JavaScript
40
star
72

regex-cache

Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in dramatic speed improvements.
JavaScript
39
star
73

unescape

Convert HTML entities to HTML characters, e.g. `>` => `>`.
JavaScript
38
star
74

pascalcase

Convert a string to pascal case (upper camel case). Used by more than 8.7 million projects on GitHub! Please follow this library's author: https://github.com/jonschlinkert
JavaScript
36
star
75

is-primitive

Is the typeof value a javascript primitive?
JavaScript
36
star
76

is-git-url

Regex to validate that a URL is a git URL.
JavaScript
35
star
77

deep-rename-keys

Recursively rename the keys in an object.
JavaScript
35
star
78

unset-value

Delete nested properties from an object using dot notation.
JavaScript
34
star
79

fs-utils

Generalized file and path utils for Node.js projects.
JavaScript
34
star
80

array-last

Return the last element in an array. Faster than `.slice`
JavaScript
34
star
81

relative

Easily calculate the relative path from file A to file B in Node.js project. Will calculate correctly from a file to a directory, file to file, directory to file, and directory to directory.
JavaScript
34
star
82

for-in

Iterate over the enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`.
JavaScript
33
star
83

global-modules

Returns the directory used by NPM for globally installed NPM packages.
JavaScript
33
star
84

extend-shallow

Extend object A with the properties of object B. node.js/javascript util.
JavaScript
32
star
85

eval-estree-expression

Safely evaluate JavaScript (estree) expressions, sync and async.
JavaScript
32
star
86

regex-not

Create a javascript regular expression for matching everything except for the given string.
JavaScript
31
star
87

longest

Get the length of the longest item in an array.
JavaScript
31
star
88

whence

Add context awareness to your apps and frameworks by safely evaluating user-defined conditional expressions. Useful for evaluating expressions in config files, prompts, key bindings, completions, templates, and many other user cases.
JavaScript
31
star
89

markdown-utils

Convert plain text into snippets of markdown.
JavaScript
30
star
90

grunt-readme

DEPRECATED. Use Verb instead
JavaScript
30
star
91

js-comments

Parse JavaScript code comments and generate API documentation.
JavaScript
30
star
92

justified

Wrap, align and justify the words in a string.
JavaScript
29
star
93

is-equal-shallow

Does a shallow comparison of two objects, returning false if the keys or values differ.
JavaScript
29
star
94

shallow-clone

Make a shallow clone of an object, array or primitive.
JavaScript
29
star
95

parse-filepath

Parse a filepath and return an object of path parts. Falls back on native node.js `path.parse` if it exists
JavaScript
29
star
96

yarn-api

Basic API for yarn.
JavaScript
28
star
97

is-directory

Extends `stats.isDirectory()`, returns `true` if a filepath is a directory.
JavaScript
28
star
98

global-prefix

Get the npm global path prefix. Same code used internally by npm.
JavaScript
28
star
99

rename-keys

Modify/rename the keys of the own enumerable properties of an object.
JavaScript
27
star
100

has-value

Returns true if a value exists, false if empty. Works with deeply nested values using object paths.
JavaScript
27
star