[go: up one dir, main page]

Page MenuHomePhabricator

Create JSDoc yaml linter in servicelib-node/spec
Closed, DeclinedPublic

Description

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.

Event Timeline

@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

Resetting inactive assignee

Is this still necessary?

connected to T284506

Is this still necessary?

@BPirkle: Do you know maybe? (Asking as the parent task was yours.)

This is a long-term nice-to-have, but is not urgent.