litleleprikon/socket-io-vscode

View on GitHub
src/SocketIOConnectionFactory.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function createConnection has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private createConnection(url: string, timeout: number): Promise<any> {
        const _self = this;

        const makeConnection: Promise<any> = new Promise((resolve, reject) => {
            const socket: ISocket = _self.connectFn(url, { timeout });
Severity: Minor
Found in src/SocketIOConnectionFactory.ts - About 1 hr to fix

    Function makeConnection has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            const makeConnection: Promise<any> = new Promise((resolve, reject) => {
                const socket: ISocket = _self.connectFn(url, { timeout });
                socket
                    .on('connect', () => {
                        resolve(new SocketIOConnection(socket, async (event: string, data: any) => {
    Severity: Minor
    Found in src/SocketIOConnectionFactory.ts - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status