Closed avatarneil closed 3 years ago
Can we tweak the codacy rules? The flag about a destructure being an unnecessary block is a little bit ridiculous. Also, I've found most modern JS codebases typically prefer single-quote strings to double-quote, but happy to switch that over if desired.
Oh, and about the codacy stuff... Maybe we should just do away with it altogether, I also find it to be more of a nuisance. Feel free to just ignore it for now. And judging from this PR, I think you're probably more knowledgeable than me (or Codacy, for that matter) regarding modern JS conventions/rules.
Re: Codacy, in most projects I typically use a hybrid of eslint + prettier, which usually works really well. The VSCode integration is super rich, so it makes it really easy to catch style errors before you even push! We could totally hook that in with something like TravisCI, CircleCI, or whatever CI we wanna use. I'd love to cut a PR at some point introducing eslint :)
Added the alerting & redirect to homescreen for when creators disconnect, as well as adding an async modifier to the method I added await
to. Thanks for the pointers in your comment, incredibly helpful as I'm still trying to get cozy in the codebase!
I'm also mostly relying on the ESLint VSCode integration atm locally. But yeah, I think we should get rid of codacy. I'll look into some CI options we can use :)
Fixes #80
Adds a
creatorId
property to rooms. All users who join a room that are not the creator will no longer see an 'everyone is in button', but in the case that a user somehow is still able to see that button, the BE will additionally check to make sure that the creatorId matches the socket id that is making the 'initiate swiping' request.Additionally, introduces some newer javascript syntax, and refactors a few things to
const
as opposed tolet
. Mutability is gross!