TristonJ / eslint-plugin-prefer-arrow

ESLint plugin to prefer arrow functions
MIT License
54 stars 10 forks source link

Incorrect behavior with TypeScript interface #22

Closed amikheychik closed 4 years ago

amikheychik commented 4 years ago

With the configuration:

'prefer-arrow/prefer-arrow-functions': ['warn', {
    allowStandaloneDeclarations: true,
    classPropertiesAllowed: true,
    disallowPrototype: false,
    singleReturnOnly: false,
}],

input:

export interface Example {
    toString(): string;
}

is transformed into:

export interface Example {
    toString: () => string;
}
amikheychik commented 4 years ago

Sorry, nevermind. It was a change from the @typescript-eslint/method-signature-style.