Skip to content

Commit 86c8987

Browse files
Bug 1826366 - [remote] Apply lint --fix for valid-jsdoc in remote r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D174738
1 parent 4035aa0 commit 86c8987

File tree

101 files changed

+708
-706
lines changed

Some content is hidden

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

101 files changed

+708
-706
lines changed

remote/cdp/CDPConnection.sys.mjs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ export class CDPConnection extends WebSocketConnection {
7070
/**
7171
* Send an error back to the CDP client.
7272
*
73-
* @param {Number} id
73+
* @param {number} id
7474
* Id of the packet which lead to an error.
7575
* @param {Error} err
7676
* Error object with `message` and `stack` attributes.
77-
* @param {String=} sessionId
77+
* @param {string=} sessionId
7878
* Id of the session used to send this packet. Falls back to the
7979
* default session if not specified.
8080
*/
@@ -90,12 +90,12 @@ export class CDPConnection extends WebSocketConnection {
9090
/**
9191
* Send an event coming from a Domain to the CDP client.
9292
*
93-
* @param {String} method
93+
* @param {string} method
9494
* The event name. This is composed by a domain name, a dot character
9595
* followed by the event name, e.g. `Target.targetCreated`.
96-
* @param {Object} params
96+
* @param {object} params
9797
* A JSON-serializable object, which is the payload of this event.
98-
* @param {String=} sessionId
98+
* @param {string=} sessionId
9999
* The sessionId from which this packet is emitted. Falls back to the
100100
* default session if not specified.
101101
*/
@@ -129,9 +129,9 @@ export class CDPConnection extends WebSocketConnection {
129129
/**
130130
* Interpret a given CDP packet for a given Session.
131131
*
132-
* @param {String} sessionId
132+
* @param {string} sessionId
133133
* ID of the session for which we should execute a command.
134-
* @param {String} message
134+
* @param {string} message
135135
* The stringified JSON payload of the CDP packet, which is about
136136
* executing a Domain's function.
137137
*/
@@ -158,11 +158,11 @@ export class CDPConnection extends WebSocketConnection {
158158
/**
159159
* Send the result of a call to a Domain's function back to the CDP client.
160160
*
161-
* @param {Number} id
161+
* @param {number} id
162162
* The request id being sent by the client to call the domain's method.
163-
* @param {Object} result
163+
* @param {object} result
164164
* A JSON-serializable object, which is the actual result.
165-
* @param {String=} sessionId
165+
* @param {string=} sessionId
166166
* The sessionId from which this packet is emitted. Falls back to the
167167
* default session if not specified.
168168
*/
@@ -208,7 +208,7 @@ export class CDPConnection extends WebSocketConnection {
208208
* This packet is sent by a CDP client and is meant to execute
209209
* a particular function on a given Domain.
210210
*
211-
* @param {Object} packet
211+
* @param {object} packet
212212
* JSON-serializable object sent by the client.
213213
*/
214214
async onPacket(packet) {
@@ -269,10 +269,10 @@ export class CDPConnection extends WebSocketConnection {
269269
/**
270270
* Splits a CDP method into domain and command components.
271271
*
272-
* @param {String} method
272+
* @param {string} method
273273
* Name of the method to split, e.g. "Browser.getVersion".
274274
*
275-
* @returns {Object<String, String>}
275+
* @returns {Object<string, string>}
276276
* Object with the domain ("Browser") and command ("getVersion")
277277
* as properties.
278278
*/

remote/cdp/Error.sys.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ export class RemoteAgentError extends Error {
5555
* error serialisation to include discrete fields for each data
5656
* property.
5757
*
58-
* @param {Object} json
58+
* @param {object} json
5959
* CDP error encoded as a JSON object, which must have a
6060
* "message" field, where the first line will make out the error
6161
* message and the subsequent lines the stacktrace.
6262
*
63-
* @return {RemoteAgentError}
63+
* @returns {RemoteAgentError}
6464
*/
6565
static fromJSON(json) {
6666
const [message, ...stack] = json.message.split("\n");

remote/cdp/StreamRegistry.sys.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class StreamRegistry {
8686
* @param {string} path
8787
* The path to the file to use as a stream.
8888
*
89-
* @return {string}
89+
* @returns {string}
9090
* Stream handle (uuid)
9191
*/
9292
add(stream) {
@@ -110,7 +110,7 @@ export class StreamRegistry {
110110
* @param {string} handle
111111
* Handle of the stream to retrieve.
112112
*
113-
* @return {Stream}
113+
* @returns {Stream}
114114
* The requested stream.
115115
*/
116116
get(handle) {
@@ -129,7 +129,7 @@ export class StreamRegistry {
129129
* @param {string} handle
130130
* Handle of the stream to remove.
131131
*
132-
* @return {boolean}
132+
* @returns {boolean}
133133
* true if successfully removed
134134
*/
135135
async remove(handle) {

remote/cdp/domains/Domain.sys.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ export class Domain {
3434
*
3535
* This can only be called from parent domains managed by a TabSession.
3636
*
37-
* @param {String} method
37+
* @param {string} method
3838
* Name of the method to call on the child domain.
39-
* @param {Object} params
39+
* @param {object} params
4040
* Optional parameters. Must be serializable.
4141
*/
4242
executeInChild(method, params) {

remote/cdp/domains/content/DOM.sys.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class DOM extends ContentProcessDomain {
2727
*
2828
* Does not require domain to be enabled. Does not start tracking any objects.
2929
*
30-
* @param {Object} options
30+
* @param {object} options
3131
* @param {number=} options.backendNodeId [not supported]
3232
* Identifier of the backend node.
3333
* @param {number=} options.depth [not supported]
@@ -41,7 +41,7 @@ export class DOM extends ContentProcessDomain {
4141
* Whether or not iframes and shadow roots should be traversed
4242
* when returning the subtree, defaults to false.
4343
*
44-
* @return {DOM.Node}
44+
* @returns {DOM.Node}
4545
* Node description.
4646
*/
4747
describeNode(options = {}) {
@@ -192,7 +192,7 @@ export class DOM extends ContentProcessDomain {
192192
/**
193193
* Resolves the JavaScript node object for a given NodeId or BackendNodeId.
194194
*
195-
* @param {Object} options
195+
* @param {object} options
196196
* @param {number} options.backendNodeId [required for now]
197197
* Backend identifier of the node to resolve.
198198
* @param {number=} options.executionContextId
@@ -202,7 +202,7 @@ export class DOM extends ContentProcessDomain {
202202
* @param {string=} options.objectGroup [not supported]
203203
* Symbolic group name that can be used to release multiple objects.
204204
*
205-
* @return {Runtime.RemoteObject}
205+
* @returns {Runtime.RemoteObject}
206206
* JavaScript object wrapper for given node.
207207
*/
208208
resolveNode(options = {}) {

remote/cdp/domains/content/Page.sys.mjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ export class Page extends ContentProcessDomain {
163163
* At this time, queued scripts do not get evaluated, hence `source` is marked as
164164
* "unsupported".
165165
*
166-
* @param {Object} options
166+
* @param {object} options
167167
* @param {string} options.source (not supported)
168168
* @param {string=} options.worldName
169-
* @return {string} Page.ScriptIdentifier
169+
* @returns {string} Page.ScriptIdentifier
170170
*/
171171
addScriptToEvaluateOnNewDocument(options = {}) {
172172
const { source, worldName } = options;
@@ -187,15 +187,15 @@ export class Page extends ContentProcessDomain {
187187
*
188188
* Really it just creates an execution context with label "isolated".
189189
*
190-
* @param {Object} options
190+
* @param {object} options
191191
* @param {string} options.frameId
192192
* Id of the frame in which the isolated world should be created.
193193
* @param {string=} options.worldName
194194
* An optional name which is reported in the Execution Context.
195195
* @param {boolean=} options.grantUniversalAccess (not supported)
196196
* This is a powerful option, use with caution.
197197
*
198-
* @return {number} Runtime.ExecutionContextId
198+
* @returns {number} Runtime.ExecutionContextId
199199
* Execution context of the isolated world.
200200
*/
201201
createIsolatedWorld(options = {}) {
@@ -234,7 +234,7 @@ export class Page extends ContentProcessDomain {
234234
/**
235235
* Controls whether page will emit lifecycle events.
236236
*
237-
* @param {Object} options
237+
* @param {object} options
238238
* @param {boolean} options.enabled
239239
* If true, starts emitting lifecycle events.
240240
*/
@@ -297,7 +297,7 @@ export class Page extends ContentProcessDomain {
297297
}
298298

299299
/**
300-
* @param {Object=} options
300+
* @param {object=} options
301301
* @param {number} options.windowId
302302
* The inner window id of the window the script has been loaded for.
303303
* @param {Window} options.window

remote/cdp/domains/content/Runtime.sys.mjs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ export class Runtime extends ContentProcessDomain {
153153
*
154154
* Object group of the result is inherited from the target object.
155155
*
156-
* @param {Object} options
156+
* @param {object} options
157157
* @param {string} options.functionDeclaration
158158
* Declaration of the function to call.
159-
* @param {Array.<Object>=} options.arguments
159+
* @param {Array.<object>=} options.arguments
160160
* Call arguments. All call arguments must belong to the same
161161
* JavaScript world as the target object.
162162
* @param {boolean=} options.awaitPromise
@@ -173,7 +173,7 @@ export class Runtime extends ContentProcessDomain {
173173
* Whether the result is expected to be a JSON object
174174
* which should be sent by value.
175175
*
176-
* @return {Object.<RemoteObject, ExceptionDetails>}
176+
* @returns {Object<RemoteObject, ExceptionDetails>}
177177
*/
178178
callFunctionOn(options = {}) {
179179
if (typeof options.functionDeclaration != "string") {
@@ -237,7 +237,7 @@ export class Runtime extends ContentProcessDomain {
237237
/**
238238
* Evaluate expression on global object.
239239
*
240-
* @param {Object} options
240+
* @param {object} options
241241
* @param {string} options.expression
242242
* Expression to evaluate.
243243
* @param {boolean=} options.awaitPromise
@@ -253,7 +253,7 @@ export class Runtime extends ContentProcessDomain {
253253
* @param {boolean=} options.userGesture [unsupported]
254254
* Whether execution should be treated as initiated by user in the UI.
255255
*
256-
* @return {Object<RemoteObject, exceptionDetails>}
256+
* @returns {Object<RemoteObject, exceptionDetails>}
257257
* The evaluation result, and optionally exception details.
258258
*/
259259
evaluate(options = {}) {
@@ -473,7 +473,7 @@ export class Runtime extends ContentProcessDomain {
473473
*
474474
* @param {string} name
475475
* Event name
476-
* @param {Object=} options
476+
* @param {object=} options
477477
* @param {number} options.windowId
478478
* The inner window id of the newly instantiated document.
479479
* @param {Window} options.window
@@ -485,7 +485,7 @@ export class Runtime extends ContentProcessDomain {
485485
* @param {string=} options.contextType
486486
* "default" or "isolated"
487487
*
488-
* @return {number} ID of created context
488+
* @returns {number} ID of created context
489489
*
490490
*/
491491
_onContextCreated(name, options = {}) {
@@ -546,7 +546,7 @@ export class Runtime extends ContentProcessDomain {
546546
*
547547
* @param {string} name
548548
* Event name
549-
* @param {Object=} options
549+
* @param {object=} options
550550
* @param {number} id
551551
* The execution context id to destroy.
552552
* @param {number} windowId

remote/cdp/domains/content/runtime/ExecutionContext.sys.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class ExecutionContext {
121121
/**
122122
* Evaluate a Javascript expression.
123123
*
124-
* @param {String} expression
124+
* @param {string} expression
125125
* The JS expression to evaluate against the JS context.
126126
* @param {boolean} options.awaitPromise
127127
* Whether execution should `await` for resulting value
@@ -130,7 +130,7 @@ export class ExecutionContext {
130130
* Whether the result is expected to be a JSON object
131131
* that should be sent by value.
132132
*
133-
* @return {Object} A multi-form object depending if the execution
133+
* @returns {object} A multi-form object depending if the execution
134134
* succeed or failed. If the expression failed to evaluate,
135135
* it will return an object with an `exceptionDetails` attribute
136136
* matching the `ExceptionDetails` CDP type. Otherwise it will
@@ -378,7 +378,7 @@ export class ExecutionContext {
378378
*
379379
* @param {Debugger.Object} debuggerObj
380380
* The object to serialize
381-
* @return {RemoteObject}
381+
* @returns {RemoteObject}
382382
* The serialized description of the given object
383383
*/
384384
_toRemoteObject(debuggerObj) {
@@ -476,7 +476,7 @@ export class ExecutionContext {
476476
*
477477
* @param {Debugger.Object} debuggerObj
478478
* The object to serialize
479-
* @return {RemoteObject}
479+
* @returns {RemoteObject}
480480
* The serialized description of the given object
481481
*/
482482
_toRemoteObjectByValue(debuggerObj) {
@@ -521,7 +521,7 @@ export class ExecutionContext {
521521
* @param {Debugger.Object} obj
522522
* The object to convert
523523
*
524-
* @return {Object}
524+
* @returns {object}
525525
* The converted object
526526
*/
527527
_serialize(debuggerObj) {

remote/cdp/domains/parent/Emulation.sys.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class Emulation extends Domain {
3131
* - window.innerHeight
3232
* - "device-width"/"device-height"-related CSS media query results
3333
*
34-
* @param {Object} options
34+
* @param {object} options
3535
* @param {number} options.width
3636
* Overriding width value in pixels. 0 disables the override.
3737
* @param {number} options.height
@@ -97,7 +97,7 @@ export class Emulation extends Domain {
9797
/**
9898
* Enables touch on platforms which do not support them.
9999
*
100-
* @param {Object} options
100+
* @param {object} options
101101
* @param {boolean} options.enabled
102102
* Whether the touch event emulation should be enabled.
103103
* @param {number=} options.maxTouchPoints [not yet supported]
@@ -123,7 +123,7 @@ export class Emulation extends Domain {
123123
/**
124124
* Allows overriding user agent with the given string.
125125
*
126-
* @param {Object} options
126+
* @param {object} options
127127
* @param {string} options.userAgent
128128
* User agent to use.
129129
* @param {string=} options.acceptLanguage [not yet supported]

remote/cdp/domains/parent/IO.sys.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class IO extends Domain {
1616
/**
1717
* Close the stream, discard any temporary backing storage.
1818
*
19-
* @param {Object} options
19+
* @param {object} options
2020
* @param {string} options.handle
2121
* Handle of the stream to close.
2222
*/
@@ -33,7 +33,7 @@ export class IO extends Domain {
3333
/**
3434
* Read a chunk of the stream.
3535
*
36-
* @param {Object} options
36+
* @param {object} options
3737
* @param {string} options.handle
3838
* Handle of the stream to read.
3939
* @param {number=} options.offset
@@ -44,7 +44,7 @@ export class IO extends Domain {
4444
* Maximum number of bytes to read (left upon the agent
4545
* discretion if not specified).
4646
*
47-
* @return {string, boolean, boolean}
47+
* @returns {string, boolean, boolean}
4848
* Data that were read, including flags for base64-encoded, and end-of-file reached.
4949
*/
5050
async read(options = {}) {

0 commit comments

Comments
 (0)