Skip to content

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

Merged
merged 1 commit into from
Nov 20, 2022

Conversation

bmish
Copy link
Contributor

@bmish bmish commented Nov 19, 2022

Checks

  • I have read the contributing guidelines.
  • If some rule is added/updated/removed, I've regenerated the rules list (npm run generate:rules-list)
  • If some rule meta info is changed, I've regenerated the plugin shared configs (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

@MichaelDeBoey MichaelDeBoey changed the title Automate docs with eslint-doc-generator docs: automate docs with eslint-doc-generator Nov 20, 2022
MichaelDeBoey
MichaelDeBoey previously approved these changes Nov 20, 2022
@MichaelDeBoey
Copy link
Member

ESLint errors will be fixed by #691

Copy link
Member

@Belco90 Belco90 left a 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.

@Belco90
Copy link
Member

Belco90 commented Nov 20, 2022

ESLint errors will be fixed by #691

Why do we have new lint errors out of the blue? Why not fixing them here?

@bmish
Copy link
Contributor Author

bmish commented Nov 20, 2022

The lint errors aren't related to this PR so I think it's a good idea to fix them in the separate PR.

@Belco90
Copy link
Member

Belco90 commented Nov 20, 2022

Lint errors fixed in #691, can you pull the main branch in this PR to get the fixes, please?

@bmish bmish force-pushed the eslint-doc-generator branch 2 times, most recently from 3b8c549 to 15c549a Compare November 20, 2022 03:47
Belco90
Belco90 previously approved these changes Nov 20, 2022
Copy link
Member

@Belco90 Belco90 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 again!

@bmish bmish force-pushed the eslint-doc-generator branch from f194d3a to 7ba1408 Compare November 20, 2022 03:54
@Belco90 Belco90 merged commit a09b361 into testing-library:main Nov 20, 2022
@Belco90
Copy link
Member

Belco90 commented Nov 20, 2022

@all-contributors please add @bmish for doc and tool

@allcontributors
Copy link
Contributor

@Belco90

I've put up a pull request to add @bmish! 🎉

@MichaelDeBoey
Copy link
Member

MichaelDeBoey commented Nov 20, 2022

@bmish
Copy link
Contributor Author

bmish commented Nov 20, 2022

Away from keyboard now but I'll be sure to investigate and fix this soon hopefully in a few hours.

@bmish bmish mentioned this pull request Nov 21, 2022
3 tasks
@bmish
Copy link
Contributor Author

bmish commented Nov 21, 2022

@MichaelDeBoey fixed in #693. Please test it, thanks for finding it.

@Belco90 Belco90 mentioned this pull request Nov 21, 2022
1 task
@github-actions
Copy link

🎉 This PR is included in version 6.0.0-alpha.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 5.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

3 participants