firebug / websocket-monitor

Not compatible with Firefox Quantum (57 and newer)
Other
147 stars 18 forks source link

Integrate eslint #59

Closed janodvarko closed 8 years ago

janodvarko commented 8 years ago

We should integrate eslint with WebSocket Monitor.

One of the long term goals is integrating WebSocket Monitor directly into Firefox DevTools and so, we might want to use the existing .eslintrc [1] so, the code is compatible and future merge is easier.

Honza

[1] https://github.com/mozilla/gecko-dev/blob/fx-team/devtools/.eslintrc

eliihen commented 8 years ago

I can have a look at this later today as well

janodvarko commented 8 years ago

Sounds great!

eliihen commented 8 years ago

@janodvarko

So I just went through a ton of ESLint warnings and pretty much cleared up the whole lot. I need to get my code fix before I leave on vacation tomorrow :)

Now, there is one error left, which I figured you could get the honours of fixing. Have a look here. I could not get the function to fire, so I was not sure if this was dead code or not. Either way, I couldn't see selectFrame on window.

And if you're curious on the ESLint changes I did: https://github.com/firebug/websocket-monitor/commit/cb440605335421c438b6b01d1df2a88df17d2491

No major changes there, just intentation, changing some shadowed variable names and the likes. I tested the app after refactor, and it seemed fine. I got tired of checking if vars were supposed to be let or const after a few files, however, so I ended up just using let everywhere. If you have strong feelings about that, feel free to update them

janodvarko commented 8 years ago

Have a look here. I could not get the function to fire, so

Fixed at: https://github.com/firebug/websocket-monitor/commit/2021aa68929b5e98f0f0392c883bfd69dca21e03 (the function is removed)

If you have strong feelings about that, feel free to update them

It's fine, I would do the same.

So I just went through a ton of ESLint warnings and pretty much cleared up the whole lot. I need to get my code fix before I leave on vacation tomorrow :)

Great job here, have a nice vacation!

Honza