We where using `sinon` in the `playwright` tests to simulate a different
time, which since `playwright@1.45.0` can be done with the Clock API
calling `page.clock.setFixedTime`.
And to test the mutex executor we can use the vitest utils spy function
`vi.fn()` instead of `sinon.spy()`
Since the legacy config is being deprecated at the end of 2024, we
should start moving to the eslint flat config.
I avoided the tseslint config helper function so we avoid wrapping
magic.
This seems to have triggered more checking since any checks in svelte
files have appeared and the $$Generic type that is being deprecated had
to be rewritten.
Also fixes some any types that weren't caught previously