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

Docs: per-rule docs (eslint-doc-generator)? #62

Open
JoshuaKGoldberg opened this issue Nov 23, 2024 · 1 comment
Open

Docs: per-rule docs (eslint-doc-generator)? #62

JoshuaKGoldberg opened this issue Nov 23, 2024 · 1 comment

Comments

@JoshuaKGoldberg
Copy link

👋 I was just pointed to this plugin by @atilafassina - and it's great, thank you for making it! +1 to having some system to enforce good react-refresh usages.

But, I found it hard to learn about this plugin and rule. There's no explicit listing of the rule(s) it comes with and so I had to peek into the src/ directory.

Most ESLint plugins today either have their own website (e.g. https://perfectionist.dev) or use eslint-doc-generator to create docs and keep them up-to-date. The latter is what most projects do that don't have a huge amount of options, rules, etc.

Would you be open to using eslint-doc-generator to align the docs to other plugins? Or failing that, having docs similar to it?

@ArnaudBarre
Copy link
Owner

Yeah some people pointed out the lack of documentation.

For now the plugin is a only one rule, and I wanted to keep it simple as I don't see any rule that could be added to it. So a website feels like a lot, and a tool to sync the only rule with the readme too. For the same reason I didn't want to make a configuration.

Maybe we can improve the readme making it explicit this is a 1 rule plugin? I'm open to improvements on the readme for sure.

From my point of view, what is lacking is a good way to explain the what and why of the plugin/rule for people that don't know Fast Refresh. I've read almost all the internals of it, so I my explanations always overwhelming for others (some people can, but I'm not good at it!). Ideally this should be documented on the new official React doc. It's been on the docs of React Native, Next, ... but not "officially" documented by the React team.

What I would also love to add is typing information for people building config to avoid typos in the name/options. I didn't found anything that was able to type options and don't make users that don't use typed config download megabytes of types. If you have a suggestion I'm happy to improve this.

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

No branches or pull requests

2 participants