-
Notifications
You must be signed in to change notification settings - Fork 5
Create CONTRIBUTING guidelines #15
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
Merged
Changes from all commits
Commits
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Contributing Guide | ||
|
||
Thank you for your interest in contributing. | ||
|
||
## Developing | ||
|
||
Depending on your needs, you may have one of two development paths: | ||
|
||
- via integrating with an existing usage (ideal for modifying the interface of our rules) | ||
- via unit testing (ideal for adding a new rule) | ||
|
||
For that reason we've included two paths to develop. Feel free to use either, or both. | ||
|
||
### Behavioral troubleshooting | ||
|
||
It may be useful to work on this in tandem with a codebase that uses the rules. In that case, we encourage improving local development experience by leveraging `npm link` functionality: | ||
|
||
1. In this repository on your machine, create the symlink to your local development directory | ||
|
||
```bash | ||
npm link | ||
npm ls @github/markdownlint-github # should show a symlink | ||
``` | ||
|
||
kendallgassner marked this conversation as resolved.
Show resolved
Hide resolved
|
||
2. In the codebase you want to test against, replace the package in your `node_modules` folder with the symlink reference | ||
|
||
```bash | ||
cd ../your-codebase | ||
npm link @github/markdownlint-github | ||
``` | ||
|
||
If you go to the `node_modules` directory in your codebase and try to navigate into the package, you'll notice that whatever changes you make in your local development directory will be reflected in the codebase. | ||
|
||
3. Reset symlinks at any time by reversing the steps via `npm unlink`. | ||
- in your codebase: `npm unlink @github/markdownlint-github` | ||
- in this directory: `npm unlink` | ||
|
||
### Unit and Interface Testing | ||
|
||
We use `jest` tests as well, which should be an equally comfortable development experience. Refer to existing test files for any patterns you may find useful. | ||
|
||
## Publishing | ||
|
||
To publish, merge your work to main (after PR process completed). | ||
|
||
Manage version and publish on a new branch, and create a PR to merge these changes into main. | ||
|
||
```bash | ||
npm version [major|minor|patch] # alternatively, manage version in package.json | ||
npm run publish | ||
``` |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I straight up just moved out what was in the README