Open mitchell-merry opened 1 month ago
Fixes #29.
Constructors like this:
class Obj { constructor(private readonly foo: number) {} };
don't have this, so they get incorrectly flagged by the plugin. We should be sure to exclude all constructors from this rule.
this
Because constructors cannot be arrow functions.
See tests, you can revert the fix to demonstrate that this change works.
Looks like the node version needs to be bumped? https://github.com/JamieMason/eslint-plugin-prefer-arrow-functions/blob/main/.nvmrc I thought this was fixed... 😄
Description (What)
Fixes #29.
Constructors like this:
don't have
this
, so they get incorrectly flagged by the plugin. We should be sure to exclude all constructors from this rule.Justification (Why)
Because constructors cannot be arrow functions.
How Can This Be Tested?
See tests, you can revert the fix to demonstrate that this change works.