Skip to content

Commit

Permalink
fix: code
Browse files Browse the repository at this point in the history
  • Loading branch information
anshumanv committed May 15, 2021
1 parent c368762 commit 0c2974d
Show file tree
Hide file tree
Showing 18 changed files with 10 additions and 38 deletions.
2 changes: 0 additions & 2 deletions client-src/clients/BaseClient.js
@@ -1,5 +1,3 @@


export default class BaseClient {
// eslint-disable-next-line no-unused-vars
static getClientPath(options) {
Expand Down
6 changes: 3 additions & 3 deletions client-src/clients/SockJSClient.js
@@ -1,10 +1,8 @@


import SockJS from '../modules/sockjs-client';
import { log } from '../utils/log';
import BaseClient from './BaseClient';

export default class SockJSClient extends BaseClient {
class SockJSClient extends BaseClient {
constructor(url) {
super();

Expand Down Expand Up @@ -37,3 +35,5 @@ export default class SockJSClient extends BaseClient {
};
}
}

export default SockJSClient;
6 changes: 3 additions & 3 deletions client-src/clients/WebsocketClient.js
@@ -1,9 +1,7 @@


import { log } from '../utils/log';
import BaseClient from './BaseClient';

export default class WebsocketClient extends BaseClient {
class WebsocketClient extends BaseClient {
constructor(url) {
super();

Expand Down Expand Up @@ -33,3 +31,5 @@ export default class WebsocketClient extends BaseClient {
};
}
}

export default WebsocketClient;
2 changes: 0 additions & 2 deletions client-src/index.js
@@ -1,5 +1,3 @@


/* global __resourceQuery WorkerGlobalScope */

// eslint-disable-next-line import/no-extraneous-dependencies
Expand Down
2 changes: 0 additions & 2 deletions client-src/modules/logger/SyncBailHookFake.js
@@ -1,5 +1,3 @@


/**
* Client stub for tapable SyncBailHook
*/
Expand Down
2 changes: 0 additions & 2 deletions client-src/modules/logger/index.js
@@ -1,5 +1,3 @@


// eslint-disable-next-line import/no-extraneous-dependencies
import 'core-js/stable/symbol';

Expand Down
2 changes: 0 additions & 2 deletions client-src/modules/sockjs-client/index.js
@@ -1,4 +1,2 @@


// eslint-disable-next-line import/no-extraneous-dependencies
export * from 'sockjs-client';
2 changes: 0 additions & 2 deletions client-src/modules/strip-ansi/index.js
@@ -1,4 +1,2 @@


// eslint-disable-next-line import/no-extraneous-dependencies
export * from 'strip-ansi';
2 changes: 0 additions & 2 deletions client-src/overlay.js
@@ -1,5 +1,3 @@


// The error overlay is inspired (and mostly copied) from Create React App (https://github.com/facebookincubator/create-react-app)
// They, in turn, got inspired by webpack-hot-middleware (https://github.com/glenjamin/webpack-hot-middleware).

Expand Down
2 changes: 0 additions & 2 deletions client-src/socket.js
@@ -1,5 +1,3 @@


/* global __webpack_dev_server_client__ */
/* eslint-disable
camelcase
Expand Down
2 changes: 0 additions & 2 deletions client-src/utils/createSocketURL.js
@@ -1,5 +1,3 @@


import url from 'url';

// We handle legacy API that is Node.js specific, and a newer API that implements the same WHATWG URL Standard used by web browsers
Expand Down
2 changes: 0 additions & 2 deletions client-src/utils/getCurrentScriptSource.js
@@ -1,5 +1,3 @@


function getCurrentScriptSource() {
// `document.currentScript` is the most accurate way to find the current script,
// but is not supported in all browsers.
Expand Down
2 changes: 0 additions & 2 deletions client-src/utils/log.js
@@ -1,5 +1,3 @@


import logger from '../modules/logger';

const name = 'webpack-dev-server';
Expand Down
2 changes: 0 additions & 2 deletions client-src/utils/parseURL.js
@@ -1,5 +1,3 @@


import url from 'url';
import getCurrentScriptSource from './getCurrentScriptSource';

Expand Down
2 changes: 0 additions & 2 deletions client-src/utils/reloadApp.js
@@ -1,5 +1,3 @@


import { log } from './log';

function reloadApp(
Expand Down
2 changes: 0 additions & 2 deletions client-src/utils/sendMessage.js
@@ -1,5 +1,3 @@


/* global __resourceQuery WorkerGlobalScope */

// Send messages to the outside, so plugins can consume it.
Expand Down
2 changes: 0 additions & 2 deletions client-src/webpack.config.js
@@ -1,5 +1,3 @@


import path from 'path';
// eslint-disable-next-line import/no-extraneous-dependencies
import webpack from 'webpack';
Expand Down
6 changes: 4 additions & 2 deletions lib/utils/getSocketClientPath.js
Expand Up @@ -8,9 +8,11 @@ function getSocketClientPath(options) {
case 'string':
// could be 'sockjs', 'ws', or a path that should be required
if (options.transportMode.client === 'sockjs') {
ClientImplementation = require('../../client/clients/SockJSClient');
ClientImplementation =
require('../../client/clients/SockJSClient').default;
} else if (options.transportMode.client === 'ws') {
ClientImplementation = require('../../client/clients/WebsocketClient');
ClientImplementation =
require('../../client/clients/WebsocketClient').default;
} else {
try {
// eslint-disable-next-line import/no-dynamic-require
Expand Down

0 comments on commit 0c2974d

Please sign in to comment.