Skip to content

Commit f96b8bf

Browse files
committed
chore(docs): add development docs
1 parent 8f8b1e6 commit f96b8bf

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Diff for: README.md

+23
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,29 @@ A [Vale](https://vale.sh)-compatible prose style for non-native English speakers
1212
- Use an apostrophe only to indicate a possessive.
1313
- Avoid contractions.
1414

15+
## Development
16+
17+
- [Rules](./compris/) are written in `yml` files using the syntax described by [Vale docs](https://vale.sh/docs/).
18+
- Every rule has a [fixture](./fixtures/) against which you can run tests.
19+
- Tests are run against the [log output](./test/expectations/) of Vale.
20+
21+
### Prerequisites
22+
23+
- [Vale](https://vale.sh/docs/vale-cli/installation/)
24+
- [Node.js](https://nodejs.org/en/download)
25+
- [pnpm](https://pnpm.io/installation)
26+
27+
Run `pnpm i` to download the test dependencies; you'd need them to run the tests.
28+
29+
### Development workflow
30+
31+
A typical workflow looks like this.
32+
33+
1. Add a new rule by creating a new `compris/<RuleName>.yml` file, or modify an existing rule in the existing `compris/<RuleName>.yml` file.
34+
2. Add or update the fixtures in the `fixtures/<RuleName>/test.md` directory.
35+
3. Add the expected logs in a `test/expectations/<RuleName>.log` file.
36+
4. Run `pnpm test` to run the tests.
37+
1538
## License
1639

1740
[MIT](./LICENSE.md)

0 commit comments

Comments
 (0)