Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 437 Bytes

avol-jsx-no-bind.md

File metadata and controls

22 lines (16 loc) · 437 Bytes

avol-jsx-no-bind

Based on jsx-no-bind rule from tslint-react.
Rule rewritten, fixed detection of bind call expression.

Forbids function binding in JSX attributes.

Checks for calling bind method with single this attribute in JSX arguments.

const myButton = (
	<button onClick={foo.bind(this)}>
		Button
	</button>
);

Usage

"avol-jsx-no-bind": true