Skip to content

Commit dafc2e0

Browse files
committed
Bug 1991124 - Fix ESLint require-jsdoc issues in urlbar and search code. r=urlbar-reviewers,search-reviewers,scunnane,dao
Differential Revision: https://phabricator.services.mozilla.com/D266628
1 parent 4c6c673 commit dafc2e0

File tree

10 files changed

+29
-11
lines changed

10 files changed

+29
-11
lines changed

browser/components/search/content/autocomplete-popup.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,15 @@
279279
/**
280280
* This is called when a one-off is clicked and when "search in new tab"
281281
* is selected from a one-off context menu.
282+
*
283+
* @param {Event} event
284+
* The event that triggered the search.
285+
* @param {nsISearchEngine} engine
286+
* The search engine being used for the search.
287+
* @param {string} where
288+
* Where the search should be opened (current tab, new tab, window etc).
289+
* @param {object} params
290+
* The parameters associated with opening the search.
282291
*/
283292
handleOneOffSearch(event, engine, where, params) {
284293
this.searchbar.handleSearchCommandWhere(event, engine, where, params);

browser/components/urlbar/SearchModeSwitcher.sys.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,8 @@ export class SearchModeSwitcher {
400400

401401
/**
402402
* Adds local options to the popup.
403+
*
404+
* @param {Element} separator
403405
*/
404406
async #buildLocalSearchModeList(separator) {
405407
if (!this.#input.isAddressbar) {

browser/components/urlbar/UrlbarProviderAutofill.sys.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,9 @@ const QUERY_URL_PREFIX_BOOKMARK = urlQuery(
296296
* @typedef AutofillData
297297
*
298298
* @property {UrlbarResult} result
299+
* The result entry.
299300
* @property {Query} instance
301+
* The query instance.
300302
*/
301303

302304
/**

browser/components/urlbar/UrlbarResult.sys.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export class UrlbarResult {
3939
/**
4040
* @typedef {object} Payload
4141
* @property {string} [qsSuggestion]
42+
* The suggestion text from quick suggest.
4243
*/
4344

4445
/**

browser/components/urlbar/UrlbarSearchTermsPersistence.sys.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ ChromeUtils.defineESModuleGetters(lazy, {
1717
/**
1818
* @typedef {object} PersistedTermsProviderInfo
1919
* @property {string} providerId
20+
* The search engine provider id associated with the persisted terms.
2021
* @property {RegExp} [searchPageRegexp]
22+
* The regular expression for determining if the search page URL matches.
2123
* @property {{key: string, values: string[], canBeMissing: boolean}[]} includeParams
24+
* The parameters that should be included in determining if the search page URL matches.
2225
* @property {{key: string, values: string[]}[]} excludeParams
26+
* The parameters that should be excluded in determining if the search page URL matches.
2327
*/
2428

2529
ChromeUtils.defineLazyGetter(lazy, "logger", () =>

browser/components/urlbar/private/MLSuggest.sys.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ class _MLSuggest {
7070
/**
7171
* Helper to wrap createEngine for testing purposes.
7272
*
73+
* @param {object} options
74+
* Configuration options for the ML engine.
7375
* @returns {MLEngine}
7476
*/
75-
createEngine(args) {
76-
return lazy.createEngine(args);
77+
createEngine(options) {
78+
return lazy.createEngine(options);
7779
}
7880

7981
/**

browser/components/urlbar/private/YelpSuggestions.sys.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,9 @@ export class YelpSuggestions extends SuggestProvider {
236236
/**
237237
* @typedef {object} L10nItem
238238
* @property {Values<RESULT_MENU_COMMAND>} [name]
239+
* The name of the command.
239240
* @property {{id: string}} [l10n]
241+
* The id of the l10n string to use for the translation.
240242
*/
241243

242244
/**

browser/components/urlbar/tests/engagementTelemetry/browser/head.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,9 @@ async function expectNoConsoleErrors(task) {
513513
* @param {number} [embeddingSize] size of embeddings
514514
*/
515515
async function doTestWithSemantic(results, task, embeddingSize = 16) {
516+
/**
517+
* A mock object that pretends to be an MLEngine.
518+
*/
516519
class MockMLEngine {
517520
async run(request) {
518521
const texts = request.args[0];

eslint-rollouts.config.mjs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -475,18 +475,9 @@ export default [
475475
"browser/components/genai/content/smart-assist.mjs",
476476
"browser/components/genai/tests/browser/browser_page_assist_actors.js",
477477
"browser/components/mozcachedohttp/MozCachedOHTTPProtocolHandler.sys.mjs",
478-
"browser/components/search/content/autocomplete-popup.js",
479478
"browser/components/security/unexpectedScriptLoad.js",
480-
"browser/components/urlbar/SearchModeSwitcher.sys.mjs",
481-
"browser/components/urlbar/UrlbarProviderAutofill.sys.mjs",
482-
"browser/components/urlbar/UrlbarResult.sys.mjs",
483-
"browser/components/urlbar/UrlbarSearchTermsPersistence.sys.mjs",
484-
"browser/components/urlbar/private/MLSuggest.sys.mjs",
485-
"browser/components/urlbar/private/YelpSuggestions.sys.mjs",
486-
"browser/components/urlbar/tests/engagementTelemetry/browser/head.js",
487479
"browser/components/webrtc/content/webrtc-preview/webrtc-preview.mjs",
488480
"toolkit/components/promiseworker/PromiseWorker.sys.mjs",
489-
"toolkit/components/search/SearchSuggestionController.sys.mjs",
490481
"toolkit/modules/AppServicesTracing.sys.mjs",
491482
],
492483
rules: mozilla.turnOff(mozilla.configs["flat/require-jsdoc"].rules),

toolkit/components/search/SearchSuggestionController.sys.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,9 @@ export class SearchSuggestionController {
307307
/**
308308
* @typedef {object} FetchResult
309309
* @property {string} term
310+
* The search term used for obtaining the suggestions.
310311
* @property {FormHistoryResultType} [formHistoryResults]
312+
* The results in a form history result object, used for `SearchSuggestions`.
311313
* @property {Array<SearchSuggestionEntry>} local
312314
* Contains local search suggestions.
313315
* @property {Array<SearchSuggestionEntry>} remote

0 commit comments

Comments
 (0)