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

Add standardized recommended/fixable/suggestions notices to rule docs #1576

Merged
merged 8 commits into from
Nov 10, 2021

Conversation

bmish
Copy link
Contributor

@bmish bmish commented Nov 4, 2021

Included changes:

  • Adds standardized notices to the top of each rule doc to indicate whether the rule is in the recommended config, autofixable, or has automated suggestions
  • Adds a test to verify each rule doc has the correct notices

These notices match the notices used by ESLint itself and many other ESLint plugins:

These notices ensure each rule doc clearly provides several critical data points by itself, without the reader having to refer to the readme rules table which has the same information.

docs/rules/catch-error-name.md Outdated Show resolved Hide resolved
docs/rules/catch-error-name.md Outdated Show resolved Hide resolved
@sindresorhus sindresorhus requested a review from fisker November 9, 2021 17:44
@sindresorhus
Copy link
Owner

@bmish
Copy link
Contributor Author

bmish commented Nov 9, 2021

How should we handle cases like this? #1586 (files)

I think it's fine for rule docs to optionally provide more detailed information about which specific cases are fixable or suggestable. In fact, some rule docs already include this information (This rule is fixable when ...), and I left this information intact (in addition to my new standardized notices which are based purely on the rule meta properties).

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

Successfully merging this pull request may close these issues.

3 participants