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
Destructuring getBy functions from the render function's returned value triggers ESLint errors when using the @typescript-eslint/unbound-method rule (included by default in the recommended-type-checked config).
This is because the functions are declared as class methods, and hence may rely on this:
Destructuring
getBy
functions from therender
function's returned value triggers ESLint errors when using the@typescript-eslint/unbound-method
rule (included by default in therecommended-type-checked
config).This is because the functions are declared as class methods, and hence may rely on
this
:The solution is to either annotate the functions with
this: void
or use arrow functions:The
render
function in@testing-library/svelte
does not have this issue.A similar fix has just been merged in SvelteKit: sveltejs/kit#12955
The text was updated successfully, but these errors were encountered: