-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Rule: require that properties in a schema include a description #334
Comments
I like this idea. I've always wanted to make schemas more helpful. Maybe a dedicated rule for it called Could use these descriptions in bmish/eslint-doc-generator#237 to auto-generate documentation about rule options. Related to description, including the Related: |
Porting over from typescript-eslint/typescript-eslint#5392: it's theoretically possible for docs generators to use the JSON schema
description
fields on rule options per https://json-schema.org/draft/2020-12/json-schema-core.html#name-schema-vocabularies. That way auto-generated rule docs can automatically be set up with those descriptions.Is this something you'd be interested in taking in as a core rule here? I'd imagine it wouldn't be something to enable in the recommended config to start given these descriptions aren't used by the default markdown docs generator. But it might be useful long-term as an opt-in option to enforce that the descriptions live in the page somehow?
For a concrete example, in typescript-eslint, the
no-explicit-any
rule defines descriptions:...and then https://typescript-eslint.io/rules/no-explicit-any/#options includes them as JSDoc options:
The text was updated successfully, but these errors were encountered: