Thanks for being willing to contribute!
Pull requests are encouraged! If you have a fix or a new linting rule to contribute:
- Fork and clone the repository
- Run
npm install
to install dependencies. - 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 rungit pull
. Then you can make all of your pull request branches based on thismaster
branch. Whenever you want to update your version ofmaster
, do a regulargit pull
. - Make your changes. Ensure that your code is formatted by Prettier and passes ESLint checks.
- Run
npm test
. - Push your branch and open a PR. 🎉
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.
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.
Feel free to star the repository. Increasing the visibility of the project will help attracting more contributors to eslint-plugin-xstate.
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
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
When adding or changing linting rules please write unit tests. Execute all tests before committing:
npm test