-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce a Linter / Validation System #56
Comments
I can try to take a swing at this once I'm done with the legacy json generator, do we know when we'd want this by? |
No ETA, priorities on parity with current generation. |
Assuming this is also gonna be ran in ci, wdyt of having it report errors inline similiar to https://www.npmjs.com/package/@reporters/github? |
Why not |
@flakey5 do you have plans to start working on this issue? I can take care of it if you're okay with that. |
I had started on this but #153 and a few others took priority so feel free to, pushed what I had so far if it's of any help https://github.com/nodejs/api-docs-tooling/tree/flakey5/56 |
@araujogui you working on this? |
Yep, it's a little harder than I expected it to be but yes. |
This is another feature we want to tackle and have within the API docs tooling. The idea is similar to ESlint: We have a system that reports on irregularities when running the API docs tooling against files.
Assume you have a missing version on one of the YAML metadata (i.e.:
version: REPLACEME
), or some of the YAML is missing (like each module may have an "introduced_in" on the first node/section), or you have some invalid type within the API docs (ie:{SomethingThatDoesNotExist}
or a typo{Obrect}
instead of{Object}
--skip-validation
;The system must know the almost exact position of something, possibly within the AST tree, which gives you a position object for each item so you can narrow it to a close position.
queries.mjs
,generators.mjs
and all utils know what is the current context being handled. (Note that since parsing and processing is async, we cannot set a static context within a Singleton)The system should not use try/catch or exceptions since the code should be evergreen and failproof to actual errors within the markdown.
constants.mjs
Possible items for the system:
REPLACEME
)The text was updated successfully, but these errors were encountered: