Skip to content

Comments that seem wrong? #65

@worstpractice

Description

@worstpractice

I noticed the following two comments in rule.spec.ts:

  1. // assertion functions are unavailable in arrow functions
  2. // function overloading is unavailable in arrow functions

I don't know the exact context for these, so this might be a frivolous issue, but AFAIK it's certainly the case that both of the aforementioined TypeScript features (assertion functions and function overloading) work perfectly fine as arrow functions.

There might be edge cases or complications to applying it as an eslint rule that I haven't thought of here, but on the face of it: the statements made in those two comments don't strike me as correct.

As for a fix: I'm not sure if the problem here is really just the phrasing of the comments themselves, or if this is a more worthwhile issue (meaning: perhaps it turns out that we can do some automatic conversion for either/both of these types of functions as well, which would be great news).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions