Skip to content

Commit

Permalink
Bug 1434446 - Enable no-unused-vars for global scope on jsm files in …
Browse files Browse the repository at this point in the history
…browser/. r=mossop

MozReview-Commit-ID: ERT1Fili25d
  • Loading branch information
Standard8 committed Mar 1, 2018
1 parent 453b78d commit a8e2f8d
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 29 deletions.
15 changes: 0 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,6 @@ module.exports = {
"rules": {
"mozilla/use-services": "off",
}
}, {
// XXX Bug 1434446. These directories have jsm files still being fixed, so
// turn off global no-unused-vars checking for them.
"files": [
"browser/components/**/*.jsm",
"browser/extensions/**/*.jsm",
],
"rules": {
"mozilla/mark-exported-symbols-as-used": "error",
"no-unused-vars": ["error", {
"args": "none",
"vars": "local",
"varsIgnorePattern": "^EXPORTED_SYMBOLS$"
}]
}
}, {
// XXX Bug 1436303. These directories are still being fixed, so turn off
// mozilla/no-cc-etc for now.
Expand Down
1 change: 0 additions & 1 deletion browser/components/customizableui/CustomizeMode.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const kDragDataTypePrefix = "text/toolbarwrapper-id/";
const kSkipSourceNodePref = "browser.uiCustomization.skipSourceNodeCheck";
const kDrawInTitlebarPref = "browser.tabs.drawInTitlebar";
const kExtraDragSpacePref = "browser.tabs.extraDragSpace";
const kMaxTransitionDurationMs = 2000;
const kKeepBroadcastAttributes = "keepbroadcastattributeswhencustomizing";

const kPanelItemContextMenu = "customizationPanelItemContextMenu";
Expand Down
4 changes: 2 additions & 2 deletions browser/components/customizableui/PanelMultiView.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ var AssociatedToNode = class {
/**
* This is associated to <panelmultiview> elements.
*/
var PanelMultiView = class extends this.AssociatedToNode {
var PanelMultiView = class extends AssociatedToNode {
/**
* Tries to open the specified <panel> and displays the main view specified
* with the "mainViewId" attribute on the <panelmultiview> node it contains.
Expand Down Expand Up @@ -1138,7 +1138,7 @@ var PanelMultiView = class extends this.AssociatedToNode {
/**
* This is associated to <panelview> elements.
*/
var PanelView = class extends this.AssociatedToNode {
var PanelView = class extends AssociatedToNode {
constructor(node) {
super(node);

Expand Down
2 changes: 0 additions & 2 deletions browser/components/downloads/DownloadsCommon.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ const kDownloadsStringsRequiringPluralForm = {
otherDownloads3: true
};

const kPartialDownloadSuffix = ".part";

const kMaxHistoryResultsForLimitedView = 42;

const kPrefBranch = Services.prefs.getBranch("browser.download.");
Expand Down
1 change: 0 additions & 1 deletion browser/components/downloads/DownloadsSubview.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ ChromeUtils.defineModuleGetter(this, "FileUtils",
"resource://gre/modules/FileUtils.jsm");

let gPanelViewInstances = new WeakMap();
const kEvents = ["ViewShowing", "ViewHiding", "click", "command"];
const kRefreshBatchSize = 10;
const kMaxWaitForIdleMs = 200;
XPCOMUtils.defineLazyGetter(this, "kButtonLabels", () => {
Expand Down
2 changes: 0 additions & 2 deletions browser/components/sessionstore/SessionSaver.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ function stopWatch(method) {
}

var stopWatchStart = stopWatch("start");
var stopWatchCancel = stopWatch("cancel");
var stopWatchFinish = stopWatch("finish");

/**
Expand Down Expand Up @@ -390,4 +389,3 @@ XPCOMUtils.defineLazyPreferenceGetter(SessionSaverInternal, "_idleDelay", PREF_I

var idleService = Cc["@mozilla.org/widget/idleservice;1"].getService(Ci.nsIIdleService);
idleService.addIdleObserver(SessionSaverInternal, SessionSaverInternal._idleDelay);

8 changes: 3 additions & 5 deletions browser/components/translation/YandexTranslator.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@ const MAX_REQUEST_CHUNKS = 1000; // Documentation says 2000.
// is MAX_REQUESTS * MAX_REQUEST_DATA.
const MAX_REQUESTS = 15;

const YANDEX_RETURN_CODE_OK = 200;

const YANDEX_ERR_KEY_INVALID = 401; // Invalid API key
const YANDEX_ERR_KEY_BLOCKED = 402; // This API key has been blocked
const YANDEX_ERR_DAILY_REQ_LIMIT_EXCEEDED = 403; // Daily limit for requests reached
const YANDEX_ERR_DAILY_CHAR_LIMIT_EXCEEDED = 404; // Daily limit of chars reached
const YANDEX_ERR_TEXT_TOO_LONG = 413; // The text size exceeds the maximum
const YANDEX_ERR_UNPROCESSABLE_TEXT = 422; // The text could not be translated
const YANDEX_ERR_LANG_NOT_SUPPORTED = 501; // The specified translation direction is not supported
// const YANDEX_ERR_TEXT_TOO_LONG = 413; // The text size exceeds the maximum
// const YANDEX_ERR_UNPROCESSABLE_TEXT = 422; // The text could not be translated
// const YANDEX_ERR_LANG_NOT_SUPPORTED = 501; // The specified translation direction is not supported

// Errors that should activate the service unavailable handling
const YANDEX_PERMANENT_ERRORS = [
Expand Down
1 change: 0 additions & 1 deletion browser/extensions/pocket/content/pktApi.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
* usedTags: All used tags from within the extension sorted by recency
*/

const Cm = Components.manager;
var EXPORTED_SYMBOLS = ["pktApi"];

ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
Expand Down

0 comments on commit a8e2f8d

Please sign in to comment.