-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Docs: Remove superfluous object option sample code #10652
Conversation
Thanks for the PR! I'm fine with changing this for now for consistency, although my impression is that the example might be useful to users who don't know how to configure options. I wonder if it would be better to change other rules to add an example instead (although admittedly that might be a much bigger task). |
Well, I'd like something else from these. I'd like for them ( A bit off-topic. |
We also have a bunch of checks to prevent inconsistent or incorrect content. |
I have a concern to change other rules: some rules have a very big number options (such as indent), and some and/or options could cause confusing. |
Maybe have a hyperlink on every rule that points to a separate doc explaining it? |
I think it would be reasonable to autogenerate some parts of the documentation. Presumably, we would still need to manually write other parts (e.g. code samples and descriptions). |
thanks for contributing! |
Thanks for merging! Btw, the same examples are actually in the same file too, but closer to the end: https://github.com/revolter/eslint/blob/fa9c9e93cecfecd2871646c0dce2d2198854adda/docs/rules/no-else-return.md#allowelseif-false |
What is the purpose of this pull request? (put an "X" next to item)
What changes did you make? (Give an overview)
The other rules don't have this sample code block, so this PR makes the
no-else-return
documentation consistent with the others.Is there anything you'd like reviewers to focus on?