Thank you for your interest in contributing.
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.
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:
-
In this repository on your machine, create the symlink to your local development directory
npm link npm ls @github/markdownlint-github # should show a symlink
-
In the codebase you want to test against, replace the package in your
node_modules
folder with the symlink referencecd ../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. -
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
- in your codebase:
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.
The publish.yml workflow will automatically publish a new release on npm upon creating a new GitHub release.