Writing yaml can be difficult, writing yaml in JSDoc is even more difficult. Find an existing or write a YAML linter/formatter for easy doc generation in the servicelib-node/spec package.
Description
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Invalid | None | T284506 Automate API Reference Documentation (Node APIs) | |||
Resolved | BPirkle | T293821 Create local command to generate API description | |||
Declined | None | T296088 Create JSDoc yaml linter in servicelib-node/spec |
Event Timeline
Comment Actions
@BPirkle and I discussed where in the development process it would make sense to do the linting/formatting. Ideally we would do the linting as early on in the process as possible.
Option 1: IDE plugin to do real-time formatting
- this limits developers to a single IDE which I don't think is a great idea
Option 2: Run an openapi linter as part of npm run doc (which executes servicelib-node/spec code) when we generate the complete static spec .yaml file.
- Note: If there is something _very_ wrong with the YAML, servicelib-node/spec will throw an error, but we want a more granular level of linting
Option 3: Write our own eslint plugin to run as part of npm run lint command
- This will parse the function annotations, but will require our own custom logic on what to throw eslint errors for.
- Started a very basic repo for this