[Pkg-mozext-commits] [tabmixplus] 06/34: Change eslint-plugin-mozilla name to eslint-plugin-tabmix. Disable import-browserjs-globals and generate environments object instead
David Prévot
taffit at moszumanska.debian.org
Mon Jun 27 13:57:56 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 49e9b24bbfdd29951a72e2ce3a270fed934113e7
Author: onemen <tabmix.onemen at gmail.com>
Date: Sat May 28 18:05:15 2016 +0300
Change eslint-plugin-mozilla name to eslint-plugin-tabmix. Disable import-browserjs-globals and generate environments object instead
---
.eslintrc.js | 25 ++++------------------
chrome/content/.eslintrc.js | 9 ++++++++
chrome/content/dialogs/.eslintrc.js | 10 +++++++++
chrome/content/minit/minit.js | 1 -
chrome/content/minit/tablib.js | 4 ++--
chrome/content/overlay/.eslintrc.js | 9 ++++++++
chrome/content/places/.eslintrc.js | 8 +++++++
chrome/content/places/places.js | 4 ----
chrome/content/preferences/.eslintrc.js | 10 +++++++++
chrome/content/preferences/events.js | 1 -
.../preferences/overlay/overlaySanitizeUI.js | 2 +-
chrome/content/preferences/preferences.js | 11 +++-------
chrome/content/scripts/.eslintrc.js | 9 ++++++++
chrome/content/scripts/content.js | 5 +++--
chrome/content/session/session.js | 4 ++--
chrome/content/session/sessionStore.js | 4 ++--
chrome/content/tabmix.js | 11 ----------
17 files changed, 72 insertions(+), 55 deletions(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index bfe0d2c..e99b68c 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -2,14 +2,10 @@
/* global module */
module.exports = {
"root": true,
- "plugins": ["mozilla"],
+ "plugins": ["tabmix"],
"env": {
- "browser": true,
"es6": true,
- "node": false,
- "amd": false,
- "mocha": false,
- "jasmine": false
+ "tabmix/browser": true,
},
// for eslint 2.0.0
@@ -18,10 +14,8 @@ module.exports = {
},
"rules": {
- "mozilla/balanced-listeners": 2,
- "mozilla/import-globals": 2,
- "mozilla/import-browserjs-globals": 2,
-
+ "tabmix/balanced-listeners": 2,
+ "tabmix/import-globals": 2,
"no-alert": 2,
"no-array-constructor": 2,
"no-bitwise": 0,
@@ -247,16 +241,5 @@ module.exports = {
},
"globals": {
- // firefox globals
- "Components": false,
-
- // globals that removed from Firefox
- "TabsOnTop": false,
- "TabView": false,
- "TabItems": false,
-
- // Firefox defining these in placesOverlay.xul
- "PlacesUtils": false,
- "PlacesUIUtils": false,
}
};
diff --git a/chrome/content/.eslintrc.js b/chrome/content/.eslintrc.js
new file mode 100644
index 0000000..8ec0560
--- /dev/null
+++ b/chrome/content/.eslintrc.js
@@ -0,0 +1,9 @@
+/* eslint strict: 0 */
+/* global module */
+module.exports = {
+ "plugins": ["tabmix"],
+ "env": {
+ "tabmix/firefox": true,
+ "tabmix/tabmix": true,
+ },
+};
diff --git a/chrome/content/dialogs/.eslintrc.js b/chrome/content/dialogs/.eslintrc.js
new file mode 100644
index 0000000..a96d9f5
--- /dev/null
+++ b/chrome/content/dialogs/.eslintrc.js
@@ -0,0 +1,10 @@
+/* eslint strict: 0 */
+/* global module */
+module.exports = {
+ "plugins": ["tabmix"],
+ "env": {
+ "tabmix/dialog": true,
+ "tabmix/firefox": false,
+ "tabmix/tabmix": false,
+ },
+};
diff --git a/chrome/content/minit/minit.js b/chrome/content/minit/minit.js
index b21d76d..f0377ff 100644
--- a/chrome/content/minit/minit.js
+++ b/chrome/content/minit/minit.js
@@ -1,4 +1,3 @@
-/* globals ChromeWindow, XULElement */
/* exported TMP_undocloseTabButtonObserver, TMP_TabView */
"use strict";
diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index 35ccff3..b4f5cfd 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -892,7 +892,7 @@ var tablib = { // eslint-disable-line
},
populateUndoWindowSubmenu: function(undoPopup) {
- /* eslint-disable mozilla/balanced-listeners */
+ /* eslint-disable tabmix/balanced-listeners */
if (!undoPopup.hasAttribute("context"))
undoPopup.setAttribute("context", "tm_undocloseWindowContextMenu");
let undoItems = JSON.parse(TabmixSvc.ss.getClosedWindowData());
@@ -928,7 +928,7 @@ var tablib = { // eslint-disable-line
TabmixSessionManager.forgetClosedWindow(-1);
});
undoPopup.insertBefore(clearList, restoreAllWindows);
- /* eslint-enable mozilla/balanced-listeners */
+ /* eslint-enable tabmix/balanced-listeners */
},
addNewFunctionsTo_gBrowser: function addNewFunctionsTo_gBrowser() {
diff --git a/chrome/content/overlay/.eslintrc.js b/chrome/content/overlay/.eslintrc.js
new file mode 100644
index 0000000..1cc806f
--- /dev/null
+++ b/chrome/content/overlay/.eslintrc.js
@@ -0,0 +1,9 @@
+/* eslint strict: 0 */
+/* global module */
+module.exports = {
+ "plugins": ["tabmix"],
+ "env": {
+ "tabmix/firefox": false,
+ "tabmix/tabmix": false,
+ },
+};
diff --git a/chrome/content/places/.eslintrc.js b/chrome/content/places/.eslintrc.js
new file mode 100644
index 0000000..cd436cb
--- /dev/null
+++ b/chrome/content/places/.eslintrc.js
@@ -0,0 +1,8 @@
+/* eslint strict: 0 */
+/* global module */
+module.exports = {
+ "plugins": ["tabmix"],
+ "env": {
+ "tabmix/places": true,
+ },
+};
diff --git a/chrome/content/places/places.js b/chrome/content/places/places.js
index 0e61b5f..e454158 100644
--- a/chrome/content/places/places.js
+++ b/chrome/content/places/places.js
@@ -1,7 +1,3 @@
-/* globals XULCommandEvent */
-/* import-globals-from-firefox browser/content/browser/places/places.js */
-/* import-globals-from-firefox browser/content/browser/places/browserPlacesViews.js */
-/* import-globals-from-firefox browser/content/browser/bookmarks/sidebarUtils.js */
"use strict";
// code by onemen
diff --git a/chrome/content/preferences/.eslintrc.js b/chrome/content/preferences/.eslintrc.js
new file mode 100644
index 0000000..68f606e
--- /dev/null
+++ b/chrome/content/preferences/.eslintrc.js
@@ -0,0 +1,10 @@
+/* eslint strict: 0 */
+/* global module */
+module.exports = {
+ "plugins": ["tabmix"],
+ "env": {
+ "tabmix/preferences": true,
+ "tabmix/firefox": false,
+ "tabmix/tabmix": false,
+ },
+};
diff --git a/chrome/content/preferences/events.js b/chrome/content/preferences/events.js
index c1dd272..4831258 100644
--- a/chrome/content/preferences/events.js
+++ b/chrome/content/preferences/events.js
@@ -1,4 +1,3 @@
-/* global gMenuPane */
/* exported gEventsPane */
"use strict";
diff --git a/chrome/content/preferences/overlay/overlaySanitizeUI.js b/chrome/content/preferences/overlay/overlaySanitizeUI.js
index e120cb3..4bd1531 100644
--- a/chrome/content/preferences/overlay/overlaySanitizeUI.js
+++ b/chrome/content/preferences/overlay/overlaySanitizeUI.js
@@ -1,4 +1,4 @@
-/* import-globals-from-firefox browser/content/browser/sanitizeDialog.js */
+/* global gSanitizePromptDialog, Sanitizer */
"use strict";
Tabmix.setSanitizer = {
diff --git a/chrome/content/preferences/preferences.js b/chrome/content/preferences/preferences.js
index 1f982f6..bc5e145 100644
--- a/chrome/content/preferences/preferences.js
+++ b/chrome/content/preferences/preferences.js
@@ -1,13 +1,8 @@
/* exported defaultSetting, toggleSyncPreference, exportData, importData,
showPane, openHelp */
-/* import-globals-from ../utils.js */
-/* import-globals-from shortcuts.js */
-/* import-globals-from menu.js */
-/* import-globals-from appearance.js */
"use strict";
/***** Preference Dialog Functions *****/
-var gIncompatiblePane;
var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
var PrefFn = {0: "", 32: "CharPref", 64: "IntPref", 128: "BoolPref"};
@@ -44,7 +39,7 @@ var gPrefWindow = {
writable: true, configurable: true});
docElt.setAttribute("animated", "false");
- gIncompatiblePane.init(docElt);
+ window.gIncompatiblePane.init(docElt);
this.instantApply = docElt.instantApply;
window.addEventListener("change", this, false);
@@ -88,7 +83,7 @@ var gPrefWindow = {
window.removeEventListener("beforeaccept", this, false);
delete Tabmix.getTopWin().tabmix_setSession;
Shortcuts.prefsChangedByTabmix = false;
- gIncompatiblePane.deinit();
+ window.gIncompatiblePane.deinit();
},
handleEvent: function(aEvent) {
@@ -556,7 +551,7 @@ function openHelp(helpTopic) {
recentWindow.openUILinkIn(helpPage + helpTopic, where);
}
-gIncompatiblePane = {
+window.gIncompatiblePane = {
lastSelected: "paneLinks",
init: function(docElt) {
diff --git a/chrome/content/scripts/.eslintrc.js b/chrome/content/scripts/.eslintrc.js
new file mode 100644
index 0000000..1cc806f
--- /dev/null
+++ b/chrome/content/scripts/.eslintrc.js
@@ -0,0 +1,9 @@
+/* eslint strict: 0 */
+/* global module */
+module.exports = {
+ "plugins": ["tabmix"],
+ "env": {
+ "tabmix/firefox": false,
+ "tabmix/tabmix": false,
+ },
+};
diff --git a/chrome/content/scripts/content.js b/chrome/content/scripts/content.js
index eccfe63..2ca0b0b 100644
--- a/chrome/content/scripts/content.js
+++ b/chrome/content/scripts/content.js
@@ -1,11 +1,12 @@
-/* eslint mozilla/balanced-listeners:0 */
+/* eslint tabmix/balanced-listeners:0 */
/* globals content, docShell, addMessageListener, sendSyncMessage,
sendAsyncMessage, sendRpcMessage */
"use strict";
var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
+Cu.import("resource://gre/modules/XPCOMUtils.jsm");
+Cu.import("resource://gre/modules/Services.jsm");
// DocShellCapabilities exist since Firefox 27
XPCOMUtils.defineLazyModuleGetter(this, "DocShellCapabilities",
diff --git a/chrome/content/session/session.js b/chrome/content/session/session.js
index cf9df35..6d5f564 100644
--- a/chrome/content/session/session.js
+++ b/chrome/content/session/session.js
@@ -1881,7 +1881,7 @@ TabmixSessionManager = {
},
createMenu: function SM_createMenu(popup, container, contents, aNoSeparators) {
- /* eslint-disable mozilla/balanced-listeners */
+ /* eslint-disable tabmix/balanced-listeners */
if (popup.id == "btn_closedwindows_menu") {
let contextmenu = !this.enableManager ? "tm_undocloseWindowContextMenu" : "tm_sessionmanagerContextMenu";
document.getElementById("btn_closedwindows_menu").setAttribute("context", contextmenu);
@@ -2029,7 +2029,7 @@ TabmixSessionManager = {
var deleteItem = popup.getElementsByAttribute("anonid", "delete")[0];
if (deleteItem)
Tabmix.setItem(deleteItem, "disabled", allEmpty && count === 0 ? true : null);
- /* eslint-enable mozilla/balanced-listeners */
+ /* eslint-enable tabmix/balanced-listeners */
},
// set defaultIndex, sessionIndex and default Attribute
diff --git a/chrome/content/session/sessionStore.js b/chrome/content/session/sessionStore.js
index 709c652..0a407a1 100644
--- a/chrome/content/session/sessionStore.js
+++ b/chrome/content/session/sessionStore.js
@@ -331,7 +331,7 @@ var TMP_ClosedTabs = {
/* .......... functions for closedtabs list menu and context menu .......... */
populateUndoSubmenu: function ct_populateUndoSubmenu(aPopup) {
- /* eslint-disable mozilla/balanced-listeners */
+ /* eslint-disable tabmix/balanced-listeners */
if (TabmixAllTabs.isAfterCtrlClick(aPopup.parentNode))
return false;
@@ -409,7 +409,7 @@ var TMP_ClosedTabs = {
TMP_ClosedTabs.restoreTab('original', -2);
});
return true;
- /* eslint-enable mozilla/balanced-listeners */
+ /* eslint-enable tabmix/balanced-listeners */
},
restoreCommand: function(aEvent) {
diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index 063d063..ef1447c 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -1,14 +1,3 @@
-/* import-globals-from utils.js */
-/* import-globals-from ./click/click.js */
-/* import-globals-from ./extensions/extensions.js */
-/* import-globals-from ./flst/lasttab.js */
-/* import-globals-from ./links/userInterface.js */
-/* import-globals-from ./minit/minit.js */
-/* import-globals-from ./minit/tablib.js */
-/* import-globals-from ./places/places.js */
-/* import-globals-from ./session/sessionStore.js */
-/* import-globals-from ./session/session.js */
-/* import-globals-from ./tab/tab.js */
"use strict";
/*
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list