Skip to content

Commit 4116d7a

Browse files
authored
Merge pull request #59 from openlayers/docs
Add a contributing doc
2 parents 63af77e + 8a61c13 commit 4116d7a

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,8 @@ This syntax is also used when referring to types of `@typedef`s and `@enum`s.
107107
/**
108108
* @type {'static:${dynamic}'}
109109
*/
110+
```
111+
112+
## Contributing
113+
114+
If you are interested in making a contribution to the project, please see the [contributing page](./contributing.md) for details on getting your development environment set up.

contributing.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Contributing
2+
3+
Thanks for your interest in contributing to `jsdoc-plugin-typescript` development. The development environment requires [Node](https://nodejs.org/en/download/package-manager) (the latest LTS release should work) and makes use of `npm` for running tasks (this comes with Node, no separate install required).
4+
5+
After cloning the repository, you can install all dependencies with `npm`:
6+
7+
```bash
8+
# install dependencies
9+
npm install
10+
```
11+
12+
## Tests
13+
14+
After making changes, add tests to cover any new functionality or bug fixes. Then run the tests:
15+
16+
```bash
17+
# run the tests
18+
npm test
19+
```
20+
21+
## Lint
22+
23+
Style guidelines for the code are configured as ESLint rules and enforced by running the `lint` task:
24+
25+
```bash
26+
# run the linter
27+
npm run lint
28+
```
29+
30+
(Note that the `lint` task is also run when you run the tests.)
31+
32+
The linter and its configuration are installed when you install the project dependencies (with `npm install`). You don't need to have ESLint (or Prettier or anything else) installed globally. If you want to have your editor configured to notify you of lint issues or fix them for you, see the [ESLint documentation](https://eslint.org/docs/latest/use/integrations) on editor integrations. Make sure your editor is configured to make use of the ESLint version and configuration installed as dependencies for this project (instead of some globally installed version or configuration you may have elsewhere).
33+
34+
You can try to auto-fix any lint related issues with this command:
35+
36+
```bash
37+
# update syntax to conform with the project guidelines
38+
npm run lint -- --fix
39+
```
40+
41+
## Pull Requests
42+
43+
After making changes and testing them locally, create [a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) with the branch that contains your contributions.
44+
45+
Before your pull request can be merged, a CI job will run the tests and the linter.

0 commit comments

Comments
 (0)