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

[Bug]: require-default-props JSON schema is incorrect #3604

Closed
controversial opened this issue Jul 20, 2023 · 0 comments · Fixed by #3605
Closed

[Bug]: require-default-props JSON schema is incorrect #3604

controversial opened this issue Jul 20, 2023 · 0 comments · Fixed by #3605

Comments

@controversial
Copy link
Contributor

(coming from eslint-types/eslint-define-config#213)

The JSON schema for the require-default-props rule incorrectly wraps the enum in an allow, resulting in a JSON schema that matches an object instead of a JSON schema that matches strings.

classes: {
allow: {
enum: ['defaultProps', 'ignore'],
},
},
functions: {
allow: {
enum: ['defaultArguments', 'defaultProps', 'ignore'],
},
},

The downstream result of the incorrect schema:
image

Here’s an example of another rule whose JSON schema is correctly written.

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

Successfully merging a pull request may close this issue.

1 participant