8000 Bug: [no-unnecessary-type-conversion] shouldn't have fixable property · Issue #11192 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content

Bug: [no-unnecessary-type-conversion] shouldn't have fixable property #11192

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

Closed
4 tasks done
mho22 opened this issue May 8, 2025 · 0 comments · Fixed by #11194
Closed
4 tasks done

Bug: [no-unnecessary-type-conversion] shouldn't have fixable property #11192

mho22 opened this issue May 8, 2025 · 0 comments · Fixed by #11194
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@mho22
Copy link
Contributor
mho22 commented May 8, 2025

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Same as issue #10988.

Rule no-unnecessary-type-conversion has fixable: 'code' and hasSuggestions: true properties in meta at line 31 :

    fixable: 'code',
    hasSuggestions: true,

But each fix is located in a suggest property on line 84, 89, 127, 140, 179, 184, 218, 223, 279, 284, 217 and 322 :

example on line 81 :

suggest: [
    {
        messageId: 'suggestRemove',
        fix: getWrappingFixer(wrappingFixerParams),
    },
    {
        messageId: 'suggestSatisfies',
        data: { type: typeString },
        fix: getWrappingFixer({
            ...wrappingFixerParams,
            wrap: expr => `${expr} satisfies ${typeString}`,
        }),
    },
],

Based on eslint documentation :

fixable: (string) Either "code" or "whitespace" if the --fix option on the command line automatically fixes problems reported by the rule.

Since fixable means "automatic fix" with --fix I suppose fixable is no more needed in this rule.

@mho22 mho22 added bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels May 8, 2025
@kirkwaiblinger kirkwaiblinger added accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for team members to take a look labels May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
2 participants
0