Skip to content

[method-signature-style] respect getter signature #4762

@AkatQuas

Description

@AkatQuas
  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have read the FAQ and my problem is not listed.

Repro

{
  "rules": {
    "@typescript-eslint/method-signature-style": ["error", "property"],
  }
}
type IService = {
  get age(): number;
}

Expected Result

age is still a getter property.

// don't auto fix
type IService = {
  get age(): number;
}

Actual Result

Now the age is a function.

// however, auto fix happends
type IService = {
  age: () => number;
}

Additional Info

None.

Versions

package version
@typescript-eslint/eslint-plugin 4.33.0
@typescript-eslint/parser 4.33.0
TypeScript 4.4.4
ESLint 7.32.0
node 14.19.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions