Skip to content

[bug] Rule no-default-props is positive for class component #1131

@g4g1

Description

@g4g1

Describe the bug

Why rule no-default-props is positive for class components?
React documentations says:
Class components will continue to support defaultProps since there is no ES6 alternative.
So why you apply this rule for class components?

Reproduction

Any class component with defaultProps breaks when rule is on

Expected behavior

Rule should apply for funcional components or it should have some config options

Platform and versions

"@eslint-react/eslint-plugin": "1.52.1",

Stack trace


Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: ReleasedThe issue has been releasedType: BugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions