Skip to content

Latest commit

 

History

History
48 lines (26 loc) · 1.02 KB

jsx-callback-arg-name.md

File metadata and controls

48 lines (26 loc) · 1.02 KB

jsx-callback-arg-name (jsx-callback-arg-name)

This rule warns about a Mitosis limitation.

Rule Details

This rule aims to warn you about using an unsupported callback parameter name.

Examples of incorrect code for this rule:

<button onClick={ e => console.log(e) }/>

<button onClick={ function (e) {} }/>

<button onClick={ function foobar(e) {} }/>

Examples of correct code for this rule:

<button/>

<button type="button"/>

<button onClick={ null }/>

<button onClick={ "string" }/>

<button onClick={ event => doSomething(event) }/>

<button onClick={ () => doSomething() }/>

<button onClick={ function(event) {} }/>