Solid/reactivity lint rule complains about async custom event handlers
Hello, I'm having some issues with solid eslint plugin regarding custom event handlers.
Just the line above is enough to reproduce it in playground. Is there any way to disable it? Or this could be a bug?
I also checked if this has anything with event delegation as custom events are not delegated and it does not seem so:
2 Replies
Would changing this regex be enough to fix the issue?
https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/src/rules/reactivity.ts#L853
It seems it is too strict, causing the if condition to fail. The
It then falls a bit later at:
https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/src/rules/reactivity.ts#L914
And the tracked scope is set as "function" instead of "called-function".
Later the code falls here:
https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/src/rules/reactivity.ts#L818
Which causes the error.
GitHub
Less strict checking of event handler attribute names by pedro00dk ...
Hi!
I'm having some issues with solid eslint plugin regarding asynchronous custom event handlers.
const comp = <my-element on-click={async () => {}} />
// warns:
// Thi...