Kenneth-Sills / eslint-config-airbnb-typescript

Airbnb's ESLint config with TypeScript support
MIT License
22 stars 0 forks source link

Consider using `@typescript-eslint/class-methods-use-this` #6

Closed Kenneth-Sills closed 3 months ago

Kenneth-Sills commented 3 months ago

Migrated from upstream issue.


There is a new @typescript-eslint/class-methods-use-this rule which makes it possible to disable the rule in the case of overrides and interface.

For example, using this (with the updated options) prevents the pesky situation where an abstract class defines some abstract methods which do NOT necessarily use this, but which need to be class methods due to the abstract class definition.


Note by maintainer:

typescript-eslint is doing their best to avoid type information being required where it's not required, but in this case saying that any class implementing an interface no longer needs any method to use this is just a wide net. I'm more amenable to ignoring methods with override.

github-actions[bot] commented 3 months ago

:tada: This issue has been resolved in version 19.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: