Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.6k
Document fix-type of no-relative-packages#2845
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -1,6 +1,6 @@ | |||
# import/no-relative-packages | |||
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). | |||
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) using [`--fix-type suggestion`](https://eslint.org/docs/latest/use/command-line-interface#--fix-type). |
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.
while this seems great, the header of the docs are autogenerated, andnpm run update:eslint-docs
overwrites this.
@bmish, is this something that can be supported by eslint-doc-generator?
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.
Since ESLint has a--fix-type
option, I agree it's a good idea to expose the type that needs to be passed to the option in the doc somewhere.
If we want to add this to the fixable notice, I would want to note that it's optional to specify the fix type:
🔧 This rule is automatically fixable by the
--fix
CLI option, optionally using--fix-type suggestion
.
There's also an optional rule doc notice value oftype
(--rule-doc-notice type
) that could be useful for this purpose. When this notice is enabled, it will show the following for asuggestion
type rule, and this could be updated to specify the type string as well:
Before:
📖 This rule identifies potential improvements.
After:
📖 This rule is of type
suggestion
and identifies potential improvements.
https://github.com/bmish/eslint-doc-generator#column-and-notice-types
Filed an issue to track this improvement:bmish/eslint-doc-generator#469
Fix types aren't obvious so documenting them avoids having to find it out via trial&error or code spelunking.