Open
Description
Repro
{
"rules": {
"@typescript-eslint/method-signature-style": ["error"]
}
}
interface Foo {
cloneThis(): this; // β reported
cloneThis: () => this; // π€ fixed to this
}
Expected Result
Methods should not be affected, this should not be autofixed:
interface Foo {
cloneThis(): this;
}
Actual Result
That type is changed to an arrow function, which doesn't have this
interface Foo {
cloneThis: () => this; // Fixed to this, broken
}
Additional Info
It causes errors elsewhere in the code
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
2.27.0 |
@typescript-eslint/parser |
2.27.0 |
TypeScript |
3.8.3 |
ESLint |
6.8.0 |
node |
13.8.0 |
npm |
6.13.6 |