Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 2.76 KB

CONTRIBUTING.md

File metadata and controls

68 lines (47 loc) · 2.76 KB

Contributing

Thanks for being willing to contribute!

Ways you can help

Contributing code

Pull requests are encouraged! If you have a fix or a new linting rule to contribute:

  1. Fork and clone the repository
  2. Run npm install to install dependencies.
  3. Create a branch for your PR with git checkout -b pr/your-branch-name.

    Tip: Keep your master branch pointing at the original repository and make pull requests from branches on your fork. To do this, run:

    git remote add upstream https://github.com/rlaffers/eslint-plugin-xstate
    git fetch upstream
    git branch --set-upstream-to=upstream/master master
    

    This will add the original repository as a "remote" called "upstream," Then fetch the git information from that remote, then set your local master branch to use the upstream master branch whenever you run git pull. Then you can make all of your pull request branches based on this master branch. Whenever you want to update your version of master, do a regular git pull.

  4. Make your changes. Ensure that your code is formatted by Prettier and passes ESLint checks.
  5. Run npm test.
  6. Push your branch and open a PR. 🎉

Suggesting improvements

Before suggesting a new linting rule, search the open issues. If you don't see it, feel free to open a new issue. Please provide a code snippet documenting a problematic usage of XState.

Giving feedback on issues

We're always looking for more opinions on discussions in the issue tracker. Either contribute clarification/justification for an issue or simply add a 👍 or ❤️ to the top post.

Spreading the word

Feel free to star the repository. Increasing the visibility of the project will help attracting more contributors to eslint-plugin-xstate.

Coding guidelines

Prettier

We use Prettier to format the source code. You can either integrate Prettier into your editor, or run it from the command line:

npm run format

ESLint

We use ESLint to enforce good and consistent coding style. For convenience, integrate ESLint into your editor or check your code with:

npm run lint

Tests

When adding or changing linting rules please write unit tests. Execute all tests before committing:

npm test