Skip to content

no-useless-constructor eslint rule with typescript false positive #6861

Closed
@xaviergonz

Description

@xaviergonz

v3.0.0

There seems to be cases where eslint rule "no-useless-constructor" will give false positives when used with typescript

e.g.

  constructor(private readonly x: number) {}

That constructor is not really useless since it will assign the given parameter to this.x, so maybe consider dropping that rule for now for typescript?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions