Skip to content
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

feat: add require-meta-schema-description rule #490

Conversation

JoshuaKGoldberg
Copy link
Contributor

@JoshuaKGoldberg JoshuaKGoldberg commented Oct 18, 2024

Fixes #334.

This is a relatively straightforward approach that descends through the AST of meta.schema. It doesn't attempt to dynamically construct the properties through AJV.

I tried it out on typescript-eslint here: typescript-eslint/typescript-eslint#10171

@JoshuaKGoldberg JoshuaKGoldberg force-pushed the require-meta-schema-description branch from 8e81ad3 to 69312a0 Compare October 18, 2024 14:22
@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review October 18, 2024 14:25
@MichaelDeBoey MichaelDeBoey changed the title feat: add require-meta-schema-description rule feat: add require-meta-schema-description rule Oct 19, 2024
@MichaelDeBoey MichaelDeBoey requested a review from a team October 19, 2024 00:02
lib/rules/require-meta-schema-description.js Outdated Show resolved Hide resolved
lib/rules/require-meta-schema-description.js Outdated Show resolved Hide resolved
@aladdin-add
Copy link
Contributor

@JoshuaKGoldberg the ci was failing somehow, can you look please?

@JoshuaKGoldberg
Copy link
Contributor Author

Ah, I was missing some test coverage in the latest changes. Filled it in & used the getStaticValue utility to be more robust around detecting keys.

Copy link
Contributor

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rule: require that properties in a schema include a description
4 participants