|
1 | 1 | # Contributing
|
2 | 2 |
|
3 |
| -There's nothing here, yet. Thanks for looking. I'll eventually get around to filling this out. |
| 3 | +## Issues |
| 4 | + |
| 5 | +To submit a bug or feature request, please first: |
| 6 | + |
| 7 | +1. Use the latest version of this plugin. |
| 8 | +2. Search existing issues, including closed issues, for your issue. |
| 9 | + - Since this plugin is a fork, please search the previous repositories too: `cartant/eslint-plugin-rxjs` and `cartant/rxjs-tslint-rules`. |
| 10 | + - Even if your issue is different, please feel free to link to related issues for context. It really helps! |
| 11 | + |
| 12 | +## Getting Started |
| 13 | + |
| 14 | +To start working an issue, first fork this repository. |
| 15 | + |
| 16 | +Then install Yarn with corepack (included in all modern versions of Node.js): |
| 17 | + |
| 18 | +```sh |
| 19 | +corepack enable |
| 20 | +``` |
| 21 | + |
| 22 | +Then run `yarn` in this repository to restore packages. |
| 23 | + |
| 24 | +## Working |
| 25 | + |
| 26 | +### Building |
| 27 | + |
| 28 | +Run `yarn build` to build this plugin into the `dist` folder. |
| 29 | + |
| 30 | +### Linting |
| 31 | + |
| 32 | +Use `yarn lint` to run all linters (ESLint, markdownlint, and eslint-doc-generator). |
| 33 | +If the eslint-doc-generator lint step fails, |
| 34 | +you may need to run `yarn docs` to auto-update the rule documentation based on your changes. |
| 35 | + |
| 36 | +All linting must pass for a pull request to be accepted. |
| 37 | +We recommend you use the VS Code plugins for ESLint and markdownlint during development. |
| 38 | + |
| 39 | +### Testing |
| 40 | + |
| 41 | +Use `yarn test` to run the tests in watch mode. |
| 42 | +We use [vitest](https://vitest.dev) for unit testing. |
| 43 | + |
| 44 | +All unit tests must pass for a pull request to be accepted. |
| 45 | +We also enforce code coverage, which you can check with `yarn coverage --coverage.reporter text`. |
| 46 | + |
| 47 | +## Pull Request |
| 48 | + |
| 49 | +For major changes, before submitting a PR, please submit an Issue so the change can be discussed first. |
| 50 | + |
| 51 | +This repository uses conventional commits. |
| 52 | +Essentially this means the title of your PR should be formatted like this: |
| 53 | + |
| 54 | +```text |
| 55 | +<type>(<area>): <desc> |
| 56 | +``` |
| 57 | + |
| 58 | +If the PR involves a breaking changes, put an exclamation mark before the colon. |
| 59 | +The body of the PR should start with "BREAKING CHANGE:" and describe the change clearly. |
| 60 | + |
| 61 | +The `<area>` may be a specific rule name, config name, or a more broad category. |
| 62 | + |
| 63 | +### Examples |
| 64 | + |
| 65 | +```text |
| 66 | +feat(prefer-root-operators): new rule for banning `rxjs/operators` |
| 67 | +``` |
| 68 | + |
| 69 | +```text |
| 70 | +fix(no-ignored-error): check observer object too, not just callbacks |
| 71 | +``` |
| 72 | + |
| 73 | +```text |
| 74 | +docs(no-async-subscribe): additional reasoning behind this rule |
| 75 | +``` |
| 76 | + |
| 77 | +```text |
| 78 | +chore(deps-dev): bump @eslint/plugin-kit from 0.2.2 to 0.2.3 |
| 79 | +``` |
| 80 | + |
| 81 | +```text |
| 82 | +feat(throw-error)!: stop linting throw statements |
| 83 | +
|
| 84 | +BREAKING CHANGE: regular JavaScript `throw` statements will no longer be handled by this rule. |
| 85 | +``` |
| 86 | + |
| 87 | +### Types |
| 88 | + |
| 89 | +- `feat`: new functionality |
| 90 | +- `fix`: bug fixes |
| 91 | +- `docs`: only documentation changes |
| 92 | +- `test`: only unit test changes |
| 93 | +- `chore`: any other changes (e.g. CI/CD, dependencies, repo maintenance) |
| 94 | + |
| 95 | +You may also see `refactor` and `style` in this repository. |
| 96 | + |
| 97 | +### Reviews |
| 98 | + |
| 99 | +After submitting a PR, your PR will be reviewed by the code owners of this repository. |
| 100 | +Please work with us to address any feedback, which may include but is not limited to: |
| 101 | + |
| 102 | +- Functional changes |
| 103 | +- Test coverage |
| 104 | +- Splitting PR into separate requests |
| 105 | +- Small amounts of bike-shedding |
| 106 | + |
| 107 | +Address each requested change and/or respond using line comments, then re-request a review. |
| 108 | +Once your PR is approved, we will merge it and publish the change in a reasonable amount of time. |
0 commit comments