Skip to content

missing "class-memebers" in "order" for typescript-eslint-parser #2066

@dudiharush

Description

@dudiharush

When I use a tsx file (typescript) with typescript-eslint-parser, and I write a class member, it always errors me for placing it before lifecycle methods. ex:

class MyComp extends React.Component<any, any> {
private _someMember; // error: should be placed before componentWillMount eslint(react/sort-comp)

componentWillMount() {
this._someMemeber = 1;
}
render...
}

Can you please add "class-members" to the "order" category, or support "everything-else" in multiple places?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions