Skip to content

[static-property-placement] Violation on accessing static variable #2283

@jp7837

Description

@jp7837

Example:

class MyComponent extends React.Component<MyProps, MyState> {
	public static displayName = "MyComponent ";
	public myMethod() {
		console.log(MyComponent.displayName);
	}
}

In the example, line 4 is flagged as a static-property-placement violation even though it simply accesses the property.

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