Skip to content

Commit 11783a3

Browse files
authored
[Contributing guide] Adding a section about documentation (Azure#13463)
* [Contributing guide] Adding a section about documentation * edit * edit
1 parent ccd2939 commit 11783a3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,22 @@ Generally speaking, the following commands are roughly equivalent:
217217
| | `rushx <scriptname>` | Run named script in the current project only |
218218
| `npx <command>` | `node_modules/.bin/<command>` | Run named command provided by installed dependency package |
219219

220+
### Documentation
221+
222+
We care deeply about the quality of our documentation in order to make the experience of using our SDK smooth and fun. We use [TSDoc](https://tsdoc.org/pages/tags/alpha/) tags to mainly document our methods, classes, and interfaces, and we use [TypeDoc](http://typedoc.org/) to generate the documentation.
223+
224+
In the case where you do not want to generate documentation for a specific definition:
225+
226+
- use `@hidden` if the definition is exported by `src/index.ts`
227+
- use `@internal` otherwise
228+
229+
To maintain the quality of the documentation, the following two facilities are provided:
230+
231+
- an [ESLint plugin](https://github.com/microsoft/tsdoc/tree/master/eslint-plugin) is used to check that our comments are well-formed TSDoc comments and it can be run using `rushx lint`
232+
- the documentation can be generated locally for a particular package using `rushx docs` and it can be inspected by opening `sdk/<package path>/dist/docs/index.html` in your favorite browser
233+
234+
TSDoc specifications can be customized using the `tsdoc.json` configuration file that can be found in the root of the repository. Currently, the `@hidden` tag is used which is only supported by TypeDoc and is not a TSDoc tag, so it is added as a custom tag in `tsdoc.json`.
235+
220236
## Onboarding a new library
221237

222238
All libraries must follow our [repository structure](https://github.com/Azure/azure-sdk/blob/master/docs/policies/repostructure.md) (specifically, it must be located at `sdk/<servicename>/<packagename>`) and your library's `package.json` must contain the required scripts as documented [above](#other-npm-scripts).

0 commit comments

Comments
 (0)