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
Standardize Rule Documentation #16474
Comments
NotesHigh Level Thoughts
note this is heavily influenced by the reference documentation for the MongoDB aggregation operators (such as this page for $sort). i think the aggregation operator pages do a good job with presenting reference docs with examples for complex configurations. given that the rules documentation is reference docs with example for complex configurations, the model applies here. Page-Level Outinesevery rule page should have:
Implementation Plan OptionsA couple of proposals. Option 1: More Structured Data in FrontmatterOne potential way would be to use as much structured data as possible, including stuff in the frontmatter and injecting in the template. could add following fields: # added to doc in `## Rule Details`
rule_details: |>
detailed description of rule in markdown.
# added to doc in `## Options`
options:
option_1:
type: Markdown. specify String, bool, etc and any other important related info
description: Markdown description of option
required: true/false
default_value: Markdown. specify important related info update rules template to render content based on this structured data. to support incremental adoption of this, adding these frontmatter fields would. then the only free-form text would be the examples section and any additional info that writer wants to add. |
continuing the above comment as a discussion - #16643 |
A quick question on this: for the options section, are you envisioning that all options are explained there without examples, and then we follow up with specific examples in the Examples section? |
correct. put the reference first, then expand in the examples section |
ESLint version
v8.x
What problem do you want to solve?
there is currently a lot of variability in how rules are documented. rules pages structures and content varies significantly. this makes harder for an end user to navigate the docs, and harder for rule makers to know how to document rules.
What do you think is the correct solution?
Participation
Additional comments
No response
The text was updated successfully, but these errors were encountered: