Added eslint
Kind of wild that we don't have eslint set up. It would have somewhat caught #6951
Do not merge yet
This is mostly for discussion. Right now we're at::
✖ 414 problems (414 errors, 0 warnings) 183 errors and 0 warnings potentially fixable with the
--fixoption.
So if anyone is bored, feel free to set up eslint properly and fix all the issues :smile:
We used to have eslint, but apparently I removed it in https://github.com/mitmproxy/mitmproxy/commit/0e9206ceb11b1c4a3ea298e6b5bda54b9baf08ee as part of the transition to esbuild. IIRC it wasn't that easy to set up with TypeScript back then. Happy to bring it back.
Strategically, I'd like to wait until @lups2000's branch is in to avoid any merge conflicts. Let's prioritize getting that into main to unblock efforts like this one. :)
When adopting eslint, we should also run it with --fix as part of our autofixer. :)