<commit_before>// todo: review this whole thing, this is not well understood.
import IO from 'socket.io';

let ioInstance = null;
let socketInstance = null;

export function io() {
  return ioInstance;
}

export function socket() {
  return socketInstance;
}

export default function initialize(http) {
  ioInstance = IO(http);

  ioInstance.on('connection', (localSocket) => {
    socketInstance = localSocket;

    // join the game id room
    localSocket.on('game', (id) => {
      localSocket.join(id);
    })
  });
}

<commit_msg>fixed linting errors<commit_after>// todo: review this whole thing, this is not well understood.
import IO from 'socket.io';

let ioInstance = null;
let socketInstance = null;

export function io() {
  return ioInstance;
}

export function socket() {
  return socketInstance;
}

export default function initialize(http) {
  ioInstance = IO(http);

  ioInstance.on('connection', (localSocket) => {
    socketInstance = localSocket;

    // join the game id room
    localSocket.on('game', (id) => {
      localSocket.join(id);
    });
  });
}
{'fraction_non_alphanumeric': 0.12546468401486988, 'fraction_numerical': 0.0, 'mean_word_length': 3.703056768558952, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3778455', 'n_tokens_mistral': 325, 'n_tokens_neox': 320, 'n_words': 100}