-
Notifications
You must be signed in to change notification settings - Fork 149
docs: automate docs with eslint-doc-generator
#690
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
Conversation
eslint-doc-generator
ESLint errors will be fixed by #691 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for this PR! I wasn't aware of this tool, it's really useful for us to auto generate those docs based on rules data.
Just leaving a comment about the new lint scripts.
Why do we have new lint errors out of the blue? Why not fixing them here? |
The lint errors aren't related to this PR so I think it's a good idea to fix them in the separate PR. |
Lint errors fixed in #691, can you pull the main branch in this PR to get the fixes, please? |
3b8c549
to
15c549a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks again!
15c549a
to
f194d3a
Compare
f194d3a
to
7ba1408
Compare
@all-contributors please add @bmish for doc and tool |
I've put up a pull request to add @bmish! 🎉 |
@bmish Rules now link to https://github.com/testing-library/eslint-plugin-testing-library/blob/docs/rules/await-async-query.md instead of https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/await-async-query.md |
Away from keyboard now but I'll be sure to investigate and fix this soon hopefully in a few hours. |
@MichaelDeBoey fixed in #693. Please test it, thanks for finding it. |
🎉 This PR is included in version 6.0.0-alpha.14 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 5.10.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Checks
npm run generate:rules-list
)npm run generate:configs
)Changes
I built this CLI tool eslint-doc-generator for automating the generation of the README rules list and rule doc title/notices for ESLint plugins. It follows common documentation conventions from this and other top ESLint plugins and will help us standardize documentation across ESLint plugins (and generally improve the usability of our custom rules through better documentation and streamline the process of adding new rules).
eslint-doc-generator is significantly more robust compared to the previous documentation generator script which I have now removed. It has much more functionality (for example, the rules list legend is auto-generated, the rules list will show additional columns of information when applicable, etc) and 100% test coverage. It is used in the top 15+ ESLint plugins already.
I also added lint scripts to ensure that no one can forget to run the generate scripts anymore.
Context