Reputation: 2205
Why is this suggested by ESLint?
The Component
does not even have this padding
or margin
as class fields.
Upvotes: 0
Views: 103
Reputation: 12894
Check the docs for the eslint rule class-methods-use-this.
If a class method does not use
this
, it can sometimes be made into a static function.
If you convert yout method into a static one, the warning will go away.
static _getListStyle() {
// ...
}
Upvotes: 1