Skip to content

Commit f580bf8

Browse files
committed
eslint
1 parent dc5338a commit f580bf8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+150
-152
lines changed

README.MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ webSocketServer.on("error", (error) => {console.error(error); process.exit(1);})
295295

296296
webSocketServer.on(
297297
"connection",
298-
async (webSocket, upgradeRequest) =>
298+
async(webSocket, upgradeRequest) =>
299299
{
300300
const nWebSocketConnectionID = wsJSONRPCRouter.addWebSocketSync(webSocket, upgradeRequest);
301301
// Do something with nWebSocketConnectionID and webSocket here, like register them as a pair with an authorization plugin.

build.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const path = require("path");
99
// This allows the watcher to restart this process.
1010
process.on(
1111
"unhandledRejection",
12-
async (reason, promise) =>
12+
async(reason, promise) =>
1313
{
1414
console.log("Unhandled Rejection at: Promise", promise, "reason", reason);
1515
process.exit(1);
@@ -38,7 +38,7 @@ async function spawnPassthru(strExecutablePath, arrParams = [])
3838
}
3939

4040

41-
(async () => {
41+
(async() => {
4242
const objPackageJSON = JSON.parse(fs.readFileSync("package.json"));
4343

4444
const arrVersionParts = objPackageJSON.version.split(".");

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "jsonrpc-bidirectional",
33
"description": "Bidirectional JSONRPC over web sockets or HTTP with extensive plugin support.",
4-
"version": "8.9.8",
4+
"version": "8.9.9",
55
"scripts": {
66
"build": "node --experimental-worker build.js",
77
"prepublish": "node --experimental-worker build.js && node --expose-gc --max-old-space-size=1024 --experimental-worker tests/main.js",
@@ -64,8 +64,8 @@
6464
"babel-preset-stage-3": "^6.24.1",
6565
"chalk": "^2.4.1",
6666
"electron": "^1.7.9",
67-
"eslint": "^4.18.2",
68-
"eslint-plugin-jsdoc": "^10.0.3",
67+
"eslint": "^6.7.2",
68+
"eslint-plugin-jsdoc": "^18.4.3",
6969
"phantom": "^4.0.12",
7070
"recursive-keys": "^0.9.0",
7171
"uglify-js": "^2.8.22",

src/BidirectionalElectronIPC.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class BidirectionalElectronIPCRouter extends JSONRPC.RouterBase
9797

9898
electron.ipcMain.on(
9999
strChannel,
100-
async (event, objJSONRPCRequest) => {
100+
async(event, objJSONRPCRequest) => {
101101
if(objJSONRPCRequest.method === "rpc.connectToEndpoint")
102102
{
103103
return this._onRPCConnectToEndpoint(objJSONRPCRequest, nConnectionID, strChannel);
@@ -159,7 +159,7 @@ class BidirectionalElectronIPCRouter extends JSONRPC.RouterBase
159159

160160
(window || self).require("electron").ipcRenderer.on( // eslint-disable-line
161161
strChannel,
162-
async (event, objJSONRPCRequest) => {
162+
async(event, objJSONRPCRequest) => {
163163
await this._routeMessage(objJSONRPCRequest, objSession, strChannel);
164164
}
165165
);
@@ -172,7 +172,7 @@ class BidirectionalElectronIPCRouter extends JSONRPC.RouterBase
172172

173173

174174
/**
175-
* @param {Object} objJSONRPCRequest
175+
* @param {object} objJSONRPCRequest
176176
* @param {number} nConnectionID
177177
* @param {string} strChannel
178178
*/
@@ -227,7 +227,7 @@ class BidirectionalElectronIPCRouter extends JSONRPC.RouterBase
227227
* Overridable to allow configuring the client further.
228228
*
229229
* @param {Class} ClientClass
230-
* @param {Object} objSession
230+
* @param {object} objSession
231231
*
232232
* @returns {JSONRPC.Client}
233233
*/
@@ -247,8 +247,8 @@ class BidirectionalElectronIPCRouter extends JSONRPC.RouterBase
247247
/**
248248
* Routes messages to either the client or the server plugin.
249249
*
250-
* @param {Object} objMessage
251-
* @param {Object} objSession
250+
* @param {object} objMessage
251+
* @param {object} objSession
252252
* @param {string} strChannel
253253
*/
254254
async _routeMessage(objMessage, objSession, strChannel)

src/BidirectionalWebRTCRouter.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class BidirectionalWebRTCRouter extends JSONRPC.RouterBase
5959

6060
this._objSessions[nConnectionID] = objSession;
6161

62-
const fnOnMessage = async (messageEvent) => {
62+
const fnOnMessage = async(messageEvent) => {
6363
await this._routeMessage(messageEvent.data, objSession);
6464
};
6565
const fnOnError = (error) => {
@@ -92,7 +92,7 @@ class BidirectionalWebRTCRouter extends JSONRPC.RouterBase
9292
* Overridable to allow configuring the client further.
9393
*
9494
* @param {Class} ClientClass
95-
* @param {Object} objSession
95+
* @param {object} objSession
9696
*
9797
* @returns {JSONRPC.Client}
9898
*/
@@ -113,7 +113,7 @@ class BidirectionalWebRTCRouter extends JSONRPC.RouterBase
113113
* Routes RTCDataChannel messages to either the client or the server WenRTC plugin.
114114
*
115115
* @param {string} strMessage
116-
* @param {Object} objSession
116+
* @param {object} objSession
117117
*/
118118
async _routeMessage(strMessage, objSession)
119119
{

src/BidirectionalWebsocketRouter.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ class BidirectionalWebsocketRouter extends JSONRPC.RouterBase
5252

5353
const strEndpointPath = JSONRPC.EndpointBase.normalizePath(
5454
webSocket.url
55-
? /*WebSocket client*/ webSocket.url
56-
: (
57-
webSocket.upgradeReq
58-
? /*ws 2.4*/ webSocket.upgradeReq.url
59-
: /*ws >= 4.x*/ upgradeRequest.url
60-
)
55+
? /*WebSocket client*/ webSocket.url
56+
: (
57+
webSocket.upgradeReq
58+
? /*ws 2.4*/ webSocket.upgradeReq.url
59+
: /*ws >= 4.x*/ upgradeRequest.url
60+
)
6161
);
6262

6363
const objSession = {
@@ -136,7 +136,7 @@ class BidirectionalWebsocketRouter extends JSONRPC.RouterBase
136136
* Overridable to allow configuring the client further.
137137
*
138138
* @param {Class} ClientClass
139-
* @param {Object} objSession
139+
* @param {object} objSession
140140
*
141141
* @returns {JSONRPC.Client}
142142
*/
@@ -157,7 +157,7 @@ class BidirectionalWebsocketRouter extends JSONRPC.RouterBase
157157
* Routes websocket messages to either the client or the server websocket plugin.
158158
*
159159
* @param {string} strMessage
160-
* @param {Object} objSession
160+
* @param {object} objSession
161161
*/
162162
async _routeMessage(strMessage, objSession)
163163
{

src/BidirectionalWorkerRouter.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class BidirectionalWorkerRouter extends JSONRPC.RouterBase
130130

131131
if(worker.addEventListener)
132132
{
133-
const fnOnMessage = async (messageEvent) => {
133+
const fnOnMessage = async(messageEvent) => {
134134
if(
135135
cluster.isMaster
136136
&& typeof messageEvent.data === "object"
@@ -155,7 +155,7 @@ class BidirectionalWorkerRouter extends JSONRPC.RouterBase
155155
}
156156
else
157157
{
158-
const fnOnMessage = async (objMessage, handle) => {
158+
const fnOnMessage = async(objMessage, handle) => {
159159
if(
160160
cluster.isMaster
161161
&& typeof objMessage === "object"
@@ -203,7 +203,7 @@ class BidirectionalWorkerRouter extends JSONRPC.RouterBase
203203

204204

205205
/**
206-
* @param {Object} objMessage
206+
* @param {object} objMessage
207207
* @param {number} nConnectionID
208208
*/
209209
_onRPCConnectToEndpoint(objMessage, nConnectionID)
@@ -270,7 +270,7 @@ class BidirectionalWorkerRouter extends JSONRPC.RouterBase
270270
* Overridable to allow configuring the client further.
271271
*
272272
* @param {Class} ClientClass
273-
* @param {Object} objSession
273+
* @param {object} objSession
274274
*
275275
* @returns {JSONRPC.Client}
276276
*/
@@ -290,8 +290,8 @@ class BidirectionalWorkerRouter extends JSONRPC.RouterBase
290290
/**
291291
* Routes worker messages to either the client or the server worker plugin.
292292
*
293-
* @param {Object} objMessage
294-
* @param {Object} objSession
293+
* @param {object} objMessage
294+
* @param {object} objSession
295295
*/
296296
async _routeMessage(objMessage, objSession)
297297
{

src/BidirectionalWorkerThreadRouter.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class BidirectionalWorkerThreadRouter extends JSONRPC.RouterBase
147147
};
148148

149149

150-
const fnOnMessage = async (objMessage, transferList) => {
150+
const fnOnMessage = async(objMessage, transferList) => {
151151
if(
152152
Threads.isMainThread
153153
&& typeof objMessage === "object"
@@ -215,7 +215,7 @@ class BidirectionalWorkerThreadRouter extends JSONRPC.RouterBase
215215

216216

217217
/**
218-
* @param {Object} objMessage
218+
* @param {object} objMessage
219219
* @param {number} nConnectionID
220220
*/
221221
_onRPCConnectToEndpoint(objMessage, nConnectionID)
@@ -284,7 +284,7 @@ class BidirectionalWorkerThreadRouter extends JSONRPC.RouterBase
284284
* Overridable to allow configuring the client further.
285285
*
286286
* @param {Class} ClientClass
287-
* @param {Object} objSession
287+
* @param {object} objSession
288288
*
289289
* @returns {JSONRPC.Client}
290290
*/
@@ -304,8 +304,8 @@ class BidirectionalWorkerThreadRouter extends JSONRPC.RouterBase
304304
/**
305305
* Routes worker messages to either the client or the server worker plugin.
306306
*
307-
* @param {Object} objMessage
308-
* @param {Object} objSession
307+
* @param {object} objMessage
308+
* @param {object} objSession
309309
*/
310310
async _routeMessage(objMessage, objSession)
311311
{

src/Client.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Client extends EventEmitter
2323
{
2424
/**
2525
* @param {string} strEndpointURL
26-
* @param {Object|undefined} objFetchOptions
26+
* @param {object|undefined} objFetchOptions
2727
*/
2828
constructor(strEndpointURL, objFetchOptions)
2929
{
@@ -401,7 +401,7 @@ class Client extends EventEmitter
401401
/**
402402
* @param {string} strFunctionName
403403
*
404-
* @returns {Object}
404+
* @returns {object}
405405
*/
406406
rpcReflectionFunction(strFunctionName)
407407
{
@@ -412,7 +412,7 @@ class Client extends EventEmitter
412412
/**
413413
* @param {Array} arrFunctionNames
414414
*
415-
* @returns {Object}
415+
* @returns {object}
416416
*/
417417
rpcReflectionFunctions(arrFunctionNames)
418418
{

src/EndpointBase.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class EndpointBase extends EventEmitter
2929
/**
3030
* @param {string} strName
3131
* @param {string} strPath
32-
* @param {Object} objReflection
32+
* @param {object} objReflection
3333
* @param {Class|null} classReverseCallsClient
3434
*/
3535
constructor(strName, strPath, objReflection, classReverseCallsClient)
@@ -166,7 +166,7 @@ class EndpointBase extends EventEmitter
166166

167167

168168
/**
169-
* @returns {Object}
169+
* @returns {object}
170170
*/
171171
get reflection()
172172
{

0 commit comments

Comments
 (0)