Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Draft
eps1lon wants to merge1 commit intoimport-js:main
base:main
Choose a base branch
Loading
fromeps1lon:patch-1

Conversation

eps1lon
Copy link
Contributor

Fix types aren't obvious so documenting them avoids having to find it out via trial&error or code spelunking.

@@ -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).
Copy link
Member

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?

Copy link
Contributor

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 typesuggestion 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

ljharb reacted with eyes emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ljharbljharbljharb left review comments

@bmishbmishbmish left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@eps1lon@ljharb@bmish

[8]ページ先頭

©2009-2025 Movatter.jp