Skip to content

Latest commit

 

History

History
86 lines (56 loc) · 4.69 KB

CONTRIBUTING.md

File metadata and controls

86 lines (56 loc) · 4.69 KB

Contributing Guide 💯

Hello stranger! ✨ Please, read the Code Of Conduct and the full guide at tunnckoCore/contributing!
Even if you are an experienced developer or active open source maintainer, it worth look over there.

welcome-teal

Every thought, every word, and every action that adds to the positive is a contribution to peace.
Each and every one of us is capable of making such a contribution
.” ~ Aung San Suu Kyi

Are you new to Open Source?

If you’re a new open source contributor, the process can be intimidating.
What if you don’t know how to code? What if something goes wrong? Don't worry!

You don’t have to contribute code! A common misconception about contributing to open source is that you need to contribute code. In fact, it’s often the other parts of a project that are most neglected or overlooked. You’ll do the project a huge favor by offering to pitch in with these types of contributions!

Even if you like to write code, other types of contributions are a great way to get involved with a project and meet other community members. Building those relationships will give you opportunities to work on other parts of the project.

Short developer guide

Hello and thanks for choosing to contribute to this project!

Since we do not use and maintain GitHub Issues for bug reports and feature requests, you should look around the threads in our Spectrum community forum. In case you want to implement some bugfix or feature, then you should:

  1. Create new branch
  2. Do your bugfix or feature
  3. Open a Pull Request
  4. Link the related forum thread

We highly recommend to use Yarn for installing dependencies and using the scripts, so there won't have some unexpected results and different node_modules trees.

We have few scripts for managing this project, you can see them on package.json or just run yarn scripts to list all available ones.

Scripts

All the management behind the scenes is done through the @tunnckocore/scripts cli, which gives us the scripts executable. But you still can use your favorite package manager.
All of the following are equivalent:

  • yarn lint
  • npm run lint
  • yarn scripts lint
  • scripts lint

So, lets look over the available commands:

test

Runs the tests and reports test coverage using nyc. Note that it will exit with non-zero code (command will fail) if the threshold is not met, but don't worry that's configurable through its .nycrc.json config file.
Note that this script may fail if you don't have nyc installed globally, since we don't have it as devDependency here either.

test-only

Running the tests, without checking the test coverage. We are using AsiaJS testing framework which in syntax is very similar to tap, tape and ava. It is blazingly fast, minimalist, highly customizable and well working with Babel or whatever you want.

lint

Using ESLint ensures (lints and formats) the code style is okey with Airbnb style guide and Prettier.
Don't worry if you don't run that script. The CircleCI job will run everything needed.

commit

It combines lint, test-only and dry scripts, which means it will lint, format, test, git add and git commit the whole project.

dry

Adds the all changed files, using git add -A; and calls interactive helper gitcommit which will ask you what type of change you've done, a description and etc. It constructs a commit message compliant to the Conventional Commits specification. For those familiar with the "Angular commit message style", it's basically the same.

This script is useful, when you want to commit more faster than usual, and when you don't change any of the source or test files. Or if you want intentionally to commit something that can't pass the tests or the linting.

docs

Looks over the source code JSDoc/Javadoc-style block comments, generates API documentation (using docks) from them and puts it on the .verb.md file, which in turn is used by Verb to generate the whole README.md file. So please don't modify the readme file manually.