You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Determine what rules should be set for working with types and the void operator
Details
Currently in a React component this is an error:
onClick={(evt)=>evt.stopPropagation()}// ^ Void expressions returned from an arrow function shorthand must be marked explicitly with the `void` // operator.eslint@typescript-eslint/no-confusing-void-expression
This could be fixed with the void operator:
onClick={(evt)=>voidevt.stopPropagation()}
But currently the no-void ESLint rule is enabled making that an error.
Disable no-void in TypeScript files?
Add ignoreArrowShorthand: true to @typescript-eslint/no-confusing-void-expression?
Do neither and include curly braces?
The text was updated successfully, but these errors were encountered:
Determine what rules should be set for working with types and the void operator
Details
Currently in a React component this is an error:
This could be fixed with the void operator:
But currently the no-void ESLint rule is enabled making that an error.
ignoreArrowShorthand: true
to @typescript-eslint/no-confusing-void-expression?The text was updated successfully, but these errors were encountered: