-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
docs: streamline CONTRIBUTING.md and add DEVELOPMENT.md #5715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
JoshuaKGoldberg
merged 6 commits into
typescript-eslint:main
from
JoshuaKGoldberg:streamlined-contributing
Oct 4, 2022
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
78d01b4
docs: streamline CONTRIBUTING.md and add DEVELOPMENT.md
JoshuaKGoldberg cf40103
lil typo
JoshuaKGoldberg 9f6541b
Apply suggestions from code review
JoshuaKGoldberg 841d4fa
Mention builds
JoshuaKGoldberg 9c6b37c
Merge branch 'main' into streamlined-contributing
JoshuaKGoldberg b6859ac
Merge branch 'main' into streamlined-contributing
JoshuaKGoldberg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Development | ||
|
||
Thank you for your interest in developing on TypeScript ESLint! ❤️🔥 | ||
|
||
> See [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our general contribution flows. | ||
|
||
## Setup | ||
|
||
After [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo): | ||
|
||
```shell | ||
git clone https://github.com/<your-name-here>/typescript-eslint | ||
cd typescript-eslint | ||
yarn | ||
``` | ||
|
||
Postinstall scripts will then fully build your repository locally with (`yarn build`). | ||
At this point, you're ready to develop! 🚀 | ||
|
||
## Builds | ||
|
||
You can run `yarn build` in any package or in the root to build the package(s). | ||
|
||
Keep in mind that packages generally depend on each other's built outputs, and you'll need to `yarn build` dependents for their consumers to receive any new local changes. | ||
For example, if you make a change within `scope-manager` and want to use it in `eslint-plugin`, you'll need to `yarn build` either from the root or within `packages/scope-manager`. | ||
|
||
## Validating Changes | ||
JoshuaKGoldberg marked this conversation as resolved.
Show resolved
Hide resolved
JoshuaKGoldberg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
The following checks are all run on pull requests automatically. | ||
You can also perform them locally. | ||
|
||
### Formatting | ||
|
||
We use [Prettier](https://prettier.io) to auto-format code. | ||
A Git pre-commit hook should apply it to all committed changes. | ||
ALternately, you can run `yarn format` in any package or in the root. | ||
|
||
### Linting | ||
|
||
All code changes must pass ESLint. | ||
You can run `yarn lint` in any package or in the root. | ||
|
||
### Proofreading | ||
|
||
Changes must pass two linters for documentation and naming, the commands for which may be run from the root: | ||
|
||
- `yarn check-spelling`: [CSpell](https://cspell.org), for all code | ||
- `yarn lint-markdown`: [Markdownlint](https://github.com/DavidAnson/markdownlint), for Markdown documentation | ||
|
||
### Tests | ||
|
||
All code changes should ideally be unit tested if possible. | ||
You can run `yarn test` in any package to run its tests. | ||
|
||
> [VS Code launch tasks](https://code.visualstudio.com/docs/editor/tasks) tasks are provided that allow [visual debugging](https://code.visualstudio.com/docs/editor/debugging) tests | ||
|
||
#### Code Coverage | ||
|
||
We aim for 100% code coverage in all PRs when possible, except in the `website/` package. | ||
Coverage reports are be generated locally whenever `yarn test` is run. | ||
|
||
The `codecov` bot should also comment on your PR with the percentage, as well as links to the line-by-line coverage of each file touched by your PR. | ||
|
||
### Type Checking | ||
|
||
All code should pass TypeScript type checking. | ||
You can run `yarn typecheck` in any package or in the root to run `tsc`. | ||
|
||
> Run `yarn typecheck -w` to start `tsc` in watch mode. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.