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

[method-signature-style] Shouldn't affect methods that usethis #1991

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

Description

@fregante

Repro

{"rules": {"@typescript-eslint/method-signature-style": ["error"]  }}
interfaceFoo{cloneThis(): this;// ❌ reportedcloneThis:()=> this;//  🤔 fixed to this}

Expected Result

Methods should not be affected, this should not be autofixed:

interfaceFoo{cloneThis(): this;}

Actual Result

That type is changed to an arrow function, which doesn't havethis

interfaceFoo{cloneThis:()=> this;//  Fixed to this, broken}

Additional Info

It causes errors elsewhere in the code

Versions

packageversion
@typescript-eslint/eslint-plugin2.27.0
@typescript-eslint/parser2.27.0
TypeScript3.8.3
ESLint6.8.0
node13.8.0
npm6.13.6

Metadata

Metadata

Assignees

Labels

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

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp