Linting and formatting

What do you see if you hover over the const payload =?
I don't see the red marker, but if I hover over it then I do see the warning.

If you add another line using payload the grey highlight disappears.

Yes, you are right:

But I don't get an error squiggle.

No, nor do I, it doesn't seem to show that for unused variables.

It's a warning, not error. Regardless it's false positive.