diff options
Diffstat (limited to '')
4 files changed, 15 insertions, 14 deletions
diff --git a/browser/components/migration/.eslintrc.js b/browser/components/migration/.eslintrc.js index 34d8ceec2d..41a71782f1 100644 --- a/browser/components/migration/.eslintrc.js +++ b/browser/components/migration/.eslintrc.js @@ -5,7 +5,6 @@ "use strict"; module.exports = { - extends: ["plugin:mozilla/require-jsdoc"], rules: { "block-scoped-var": "error", complexity: ["error", { max: 22 }], @@ -14,7 +13,7 @@ module.exports = { "no-multi-str": "error", "no-return-assign": "error", "no-shadow": "error", - "no-unused-vars": ["error", { args: "after-used", vars: "all" }], + "no-unused-vars": ["error", { argsIgnorePattern: "^_", vars: "all" }], strict: ["error", "global"], yoda: "error", }, @@ -26,7 +25,7 @@ module.exports = { "no-unused-vars": [ "error", { - args: "none", + argsIgnorePattern: "^_", vars: "local", }, ], diff --git a/browser/components/migration/FileMigrators.sys.mjs b/browser/components/migration/FileMigrators.sys.mjs index 3384011c13..487d77aa6c 100644 --- a/browser/components/migration/FileMigrators.sys.mjs +++ b/browser/components/migration/FileMigrators.sys.mjs @@ -138,11 +138,10 @@ export class FileMigratorBase { * from the native file picker. This will not be called if the user * chooses to cancel the native file picker. * - * @param {string} filePath + * @param {string} _filePath * The path that the user selected from the native file picker. */ - // eslint-disable-next-line no-unused-vars - async migrate(filePath) { + async migrate(_filePath) { throw new Error("FileMigrator.migrate must be overridden."); } } diff --git a/browser/components/migration/MigratorBase.sys.mjs b/browser/components/migration/MigratorBase.sys.mjs index 52bfc87b3e..32bed4e6ec 100644 --- a/browser/components/migration/MigratorBase.sys.mjs +++ b/browser/components/migration/MigratorBase.sys.mjs @@ -141,7 +141,7 @@ export class MigratorBase { * bookmarks file exists. * * @abstract - * @param {object|string} aProfile + * @param {object|string} _aProfile * The profile from which data may be imported, or an empty string * in the case of a single-profile migrator. * In the case of multiple-profiles migrator, it is guaranteed that @@ -149,8 +149,7 @@ export class MigratorBase { * above). * @returns {Promise<MigratorResource[]>|MigratorResource[]} */ - // eslint-disable-next-line no-unused-vars - getResources(aProfile) { + getResources(_aProfile) { throw new Error("getResources must be overridden"); } @@ -223,14 +222,13 @@ export class MigratorBase { * to getPermissions resolves to true, that the MigratorBase will be able to * get read access to all of the resources it needs to do a migration. * - * @param {DOMWindow} win + * @param {DOMWindow} _win * The top-level DOM window hosting the UI that is requesting the permission. * This can be used to, for example, anchor a file picker window to the * same window that is hosting the migration UI. * @returns {Promise<boolean>} */ - // eslint-disable-next-line no-unused-vars - async getPermissions(win) { + async getPermissions(_win) { return Promise.resolve(true); } diff --git a/browser/components/migration/content/migration-wizard.mjs b/browser/components/migration/content/migration-wizard.mjs index 6fc7a715d7..89872a1558 100644 --- a/browser/components/migration/content/migration-wizard.mjs +++ b/browser/components/migration/content/migration-wizard.mjs @@ -583,9 +583,14 @@ export class MigrationWizard extends HTMLElement { "div[name='page-selection']" ); + let header = selectionPage.querySelector(".migration-wizard-header"); + let selectionHeaderString = this.getAttribute("selection-header-string"); + if (this.hasAttribute("selection-header-string")) { - selectionPage.querySelector(".migration-wizard-header").textContent = - this.getAttribute("selection-header-string"); + header.textContent = selectionHeaderString; + header.toggleAttribute("hidden", !selectionHeaderString); + } else { + header.removeAttribute("hidden"); } let selectionSubheaderString = this.getAttribute( |