Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 599 Bytes

File metadata and controls

30 lines (20 loc) · 599 Bytes

@eslint-react/core / isRenderMethodLike

Function: isRenderMethodLike()

function isRenderMethodLike(node: Node): node is TSESTreeMethodOrProperty;

Check whether given node is a render method of a class component

Parameters

Parameter Type Description
node Node The AST node to check

Returns

node is TSESTreeMethodOrProperty

true if node is a render function, false if not

Example

class Component extends React.Component {
  renderHeader = () => <div />;
  renderFooter = () => <div />;
}