Skip to content

Commit

Permalink
Satisfy linter
Browse files Browse the repository at this point in the history
  • Loading branch information
stoically committed Jun 24, 2019
1 parent c81ec07 commit 150fee3
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 35 deletions.
33 changes: 4 additions & 29 deletions src/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
{
"env": {
"browser": true,
"node": false
},
"globals": {
"tmp": true,
"debug": true,
"lib": true,
"psl": true,
"log": true,
"delay": true,
"globToRegexp": true,
"PQueue": true,
"versionCompare": true,
"Container": true,
"MultiAccountContainers": true,
"MouseClick": true,
"Request": true,
"Storage": true,
"Tabs": true,
"Runtime": true,
"BrowserAction": true,
"PageAction": true,
"ContextMenu": true,
"Commands": true,
"Migration": true,
"Utils": true,
"Cookies": true
}
"env": {
"browser": true,
"node": false
}
}
13 changes: 13 additions & 0 deletions src/core/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"globals": {
"tmp": "readonly",
"debug": "readonly",
"lib": "readonly",
"psl": "readonly",
"log": "readonly",
"delay": "readonly",
"globToRegexp": "readonly",
"PQueue": "readonly",
"versionCompare": "readonly"
}
}
4 changes: 2 additions & 2 deletions src/core/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ class TemporaryContainers {
constructor() {
this.initialized = false;

this.storage = new window.Storage;
this.storage = new window.TmpStorage;
this.utils = new window.Utils(this);
this.runtime = new window.Runtime(this);
this.management = new window.Management(this);
this.request = new window.Request(this);
this.request = new window.TmpRequest(this);
this.container = new window.Container(this);
this.mouseclick = new window.MouseClick(this);
this.tabs = new window.Tabs(this);
Expand Down
1 change: 1 addition & 0 deletions src/core/background/cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class Cookies {

if (cookieAllowed) {
cookieHeaderChanged = true;
// eslint-disable-next-line require-atomic-updates
cookiesHeader[cookieAllowed.name] = cookieAllowed.value;
debug('[maybeAddCookiesToHeader] cookie value changed', cookiesHeader);
}
Expand Down
1 change: 1 addition & 0 deletions src/core/background/onbeforerequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ browser.webRequest.onBeforeRequest.addListener(async (request) => {
retry++;
if (retry > MAX_RETRIES) {
console.log('[onBeforeRequest] max retries reached, giving up', request);
// eslint-disable-next-line require-atomic-updates
waitingForInitializingFailed = true;
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/background/request.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Request {
class TmpRequest {
constructor(background) {
this.background = background;
this.canceledTabs = {};
Expand Down Expand Up @@ -315,4 +315,4 @@ class Request {
}
}

window.Request = Request;
window.TmpRequest = TmpRequest;
4 changes: 2 additions & 2 deletions src/core/background/storage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Storage {
class TmpStorage {
constructor() {
this.loaded = false;
this.loading = false;
Expand Down Expand Up @@ -221,4 +221,4 @@ class Storage {
}
}

window.Storage = Storage;
window.TmpStorage = TmpStorage;

0 comments on commit 150fee3

Please sign in to comment.