-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
docs(eslint-plugin): correct issues in documentation #1396
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
- description in documentation should match rule metadata - validate if header in docs matches "# {description} (`{ruleName}`)" - fix link to docs for some rules
This comment has been minimized.
This comment has been minimized.
packages/eslint-plugin/tools/validate-docs/check-for-rule-docs.ts
Outdated
Show resolved
Hide resolved
packages/eslint-plugin/tools/validate-docs/check-for-rule-docs.ts
Outdated
Show resolved
Hide resolved
Thanks for doing this! |
ok, i applied requested changes, bdw. what do you think about my idea about moving this out to jest test? i just saw 3256f19 👍 |
Sorry, I missed the description.
You've done it right -
I actually don't mind the idea of moving this to a jest test. It's weird, I've written scripts like this so many times but I never thought about using a testing framework to report. Does it work well? |
it works in same way as any other test, results are same, but messages are less descriptive (jest has no concept of custom message without custom functions) running it with other tests is actually faster (+~200ms) as opposed to ~4sec, running it in standalone mode |
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.
This seems fine to me as is.
We can merge this and then (as discussed) convert the scripts to tests in a separate PR.
"# {description} (`{name}`)"
i was also thinking about replacing this custom validation with jest test case
Test file
This code does same checks as `validate-docs`
Q: How header in documentation for rule should look like? (right now we are its random)
# {description} (`{name}`)
# {description} ({name})