Enable the ESLint object-shorthand
rule in the extensions/chromium/
-folder
Based on the following compatibility information, there can't be any compelling reason to not enable this ESLint rule now: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#browser_compatibility See also https://eslint.org/docs/rules/object-shorthand
This commit is contained in:
parent
83e1064360
commit
66c8a0897a
@ -18,6 +18,5 @@
|
|||||||
"rules": {
|
"rules": {
|
||||||
"mozilla/import-globals": "error",
|
"mozilla/import-globals": "error",
|
||||||
"no-var": "off",
|
"no-var": "off",
|
||||||
"object-shorthand": "off",
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ limitations under the License.
|
|||||||
// Overwrite if computed textLayerMode is not the default value (1).
|
// Overwrite if computed textLayerMode is not the default value (1).
|
||||||
storageSync.set(
|
storageSync.set(
|
||||||
{
|
{
|
||||||
textLayerMode: textLayerMode,
|
textLayerMode,
|
||||||
},
|
},
|
||||||
function () {
|
function () {
|
||||||
if (!chrome.runtime.lastError) {
|
if (!chrome.runtime.lastError) {
|
||||||
|
@ -28,7 +28,7 @@ limitations under the License.
|
|||||||
if (url) {
|
if (url) {
|
||||||
url = url[1];
|
url = url[1];
|
||||||
chrome.pageAction.setPopup({
|
chrome.pageAction.setPopup({
|
||||||
tabId: tabId,
|
tabId,
|
||||||
popup: "/pageAction/popup.html?file=" + encodeURIComponent(url),
|
popup: "/pageAction/popup.html?file=" + encodeURIComponent(url),
|
||||||
});
|
});
|
||||||
chrome.pageAction.show(tabId);
|
chrome.pageAction.show(tabId);
|
||||||
|
@ -78,9 +78,9 @@ limitations under the License.
|
|||||||
if (windowId) {
|
if (windowId) {
|
||||||
chrome.tabs.create(
|
chrome.tabs.create(
|
||||||
{
|
{
|
||||||
windowId: windowId,
|
windowId,
|
||||||
active: true,
|
active: true,
|
||||||
url: url,
|
url,
|
||||||
},
|
},
|
||||||
function () {
|
function () {
|
||||||
openViewer(windowId, fileEntries);
|
openViewer(windowId, fileEntries);
|
||||||
@ -91,7 +91,7 @@ limitations under the License.
|
|||||||
{
|
{
|
||||||
type: "normal",
|
type: "normal",
|
||||||
focused: true,
|
focused: true,
|
||||||
url: url,
|
url,
|
||||||
},
|
},
|
||||||
function (chromeWindow) {
|
function (chromeWindow) {
|
||||||
openViewer(chromeWindow.id, fileEntries);
|
openViewer(chromeWindow.id, fileEntries);
|
||||||
|
@ -242,12 +242,12 @@ chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) {
|
|||||||
chrome.tabs.create({
|
chrome.tabs.create({
|
||||||
windowId: sender.tab.windowId,
|
windowId: sender.tab.windowId,
|
||||||
index: sender.tab.index + 1,
|
index: sender.tab.index + 1,
|
||||||
url: url,
|
url,
|
||||||
openerTabId: sender.tab.id,
|
openerTabId: sender.tab.id,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
chrome.tabs.update(sender.tab.id, {
|
chrome.tabs.update(sender.tab.id, {
|
||||||
url: url,
|
url,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ chrome.runtime.onConnect.addListener(function onReceivePort(port) {
|
|||||||
{
|
{
|
||||||
urls: [data.requestUrl],
|
urls: [data.requestUrl],
|
||||||
types: ["xmlhttprequest"],
|
types: ["xmlhttprequest"],
|
||||||
tabId: tabId,
|
tabId,
|
||||||
},
|
},
|
||||||
["blocking", ...extraInfoSpecWithHeaders]
|
["blocking", ...extraInfoSpecWithHeaders]
|
||||||
);
|
);
|
||||||
@ -148,7 +148,7 @@ chrome.runtime.onConnect.addListener(function onReceivePort(port) {
|
|||||||
{
|
{
|
||||||
urls: ["https://*/*"],
|
urls: ["https://*/*"],
|
||||||
types: ["xmlhttprequest"],
|
types: ["xmlhttprequest"],
|
||||||
tabId: tabId,
|
tabId,
|
||||||
},
|
},
|
||||||
["blocking", "responseHeaders"]
|
["blocking", "responseHeaders"]
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user