Merge pull request #13922 from Snuffleupagus/eslint-object-shorthand-chromium

Enable the ESLint `object-shorthand` rule in the `extensions/chromium/`-folder
This commit is contained in:
Tim van der Meij 2021-08-22 13:58:02 +02:00 committed by GitHub
commit d022333618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 10 deletions

View File

@ -18,6 +18,5 @@
"rules": {
"mozilla/import-globals": "error",
"no-var": "off",
"object-shorthand": "off",
},
}

View File

@ -119,7 +119,7 @@ limitations under the License.
// Overwrite if computed textLayerMode is not the default value (1).
storageSync.set(
{
textLayerMode: textLayerMode,
textLayerMode,
},
function () {
if (!chrome.runtime.lastError) {

View File

@ -28,7 +28,7 @@ limitations under the License.
if (url) {
url = url[1];
chrome.pageAction.setPopup({
tabId: tabId,
tabId,
popup: "/pageAction/popup.html?file=" + encodeURIComponent(url),
});
chrome.pageAction.show(tabId);

View File

@ -78,9 +78,9 @@ limitations under the License.
if (windowId) {
chrome.tabs.create(
{
windowId: windowId,
windowId,
active: true,
url: url,
url,
},
function () {
openViewer(windowId, fileEntries);
@ -91,7 +91,7 @@ limitations under the License.
{
type: "normal",
focused: true,
url: url,
url,
},
function (chromeWindow) {
openViewer(chromeWindow.id, fileEntries);

View File

@ -242,12 +242,12 @@ chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) {
chrome.tabs.create({
windowId: sender.tab.windowId,
index: sender.tab.index + 1,
url: url,
url,
openerTabId: sender.tab.id,
});
} else {
chrome.tabs.update(sender.tab.id, {
url: url,
url,
});
}
}

View File

@ -123,7 +123,7 @@ chrome.runtime.onConnect.addListener(function onReceivePort(port) {
{
urls: [data.requestUrl],
types: ["xmlhttprequest"],
tabId: tabId,
tabId,
},
["blocking", ...extraInfoSpecWithHeaders]
);
@ -148,7 +148,7 @@ chrome.runtime.onConnect.addListener(function onReceivePort(port) {
{
urls: ["https://*/*"],
types: ["xmlhttprequest"],
tabId: tabId,
tabId,
},
["blocking", "responseHeaders"]
);