sidorares / node-x11

X11 node.js network protocol client
MIT License
517 stars 72 forks source link

WIP: Introduce eslint, and conform to its recommended rule set #197

Open anko opened 3 years ago

anko commented 3 years ago

We talked about maybe doing this in 2018, and for some reason I woke up today wanting to eslint something. :thinking: Maybe it's because I've been playing Factorio for 2 days straight.

So I fired it up with "eslint:recommended"-settings and beat the red text with hammers until I got tired. Here's the progress so far.

I've fixed stuff that looked obvious (unused variables, mixed tabbing, vars overriding each other, …) but left eslint erroring if I felt unsure. I mostly did only the minimum to resolve the eslint error, so for example while a full varconst/let replacement round would be a good idea, I've so far just been replacing them individually where they fix eslint errors.


Ones I'm unsure about that @sidorares should maybe check that they're no problem:

Marked items either passed lint already, or I did a basic pass over them (adding notable issues to the above list for competent review):