style: fix eslint errors
Change-Id: Ib99b0010bcd00df3ee4e30f7c1b787cfe7d5e9ab
diff --git a/src/common/architecture/scripts/Script.ts b/src/common/architecture/scripts/Script.ts
index 5cca2c4..8f45601 100644
--- a/src/common/architecture/scripts/Script.ts
+++ b/src/common/architecture/scripts/Script.ts
@@ -41,7 +41,7 @@
* Priority with which the script is executed. Scripts with a lower value are
* executed first.
*/
- readonly priority: Number = 2 ** 31;
+ readonly priority: number = 2 ** 31;
/**
* Page where the script should be executed.
diff --git a/src/common/contentScriptsUtils.ts b/src/common/contentScriptsUtils.ts
index 588e4af..e5fc03d 100644
--- a/src/common/contentScriptsUtils.ts
+++ b/src/common/contentScriptsUtils.ts
@@ -6,7 +6,7 @@
stylesheetName: string,
attributes: StylesheetAttributes = {},
) {
- var link = document.createElement('link');
+ const link = document.createElement('link');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('href', stylesheetName);
if ('media' in attributes) {
@@ -21,7 +21,7 @@
}
export function injectScript(scriptName: string, prepend = false) {
- var script = document.createElement('script');
+ const script = document.createElement('script');
script.src = scriptName;
const root = document.head || document.documentElement;
if (prepend) {
diff --git a/src/common/options/optionsPrototype.ts b/src/common/options/optionsPrototype.ts
index 671deb8..906e4b1 100644
--- a/src/common/options/optionsPrototype.ts
+++ b/src/common/options/optionsPrototype.ts
@@ -151,7 +151,7 @@
// Internal kill switches
killswitch_xhrproxy: {
- defaultValue: undefined as any,
+ defaultValue: undefined as unknown,
context: OptionContext.Internal,
killSwitchType: KillSwitchType.InternalKillSwitch,
},
@@ -227,7 +227,7 @@
>;
export const optionsPrototype: Record<
string,
- OptionPrototype<any>
+ OptionPrototype<unknown>
> = rawOptionConfigs;
export const options = Object.entries(optionsPrototype).map(
diff --git a/src/features/autoRefresh/nodeWatcherHandlers/threadListHide.handler.ts b/src/features/autoRefresh/nodeWatcherHandlers/threadListHide.handler.ts
index 4b1082d..d0a41de 100644
--- a/src/features/autoRefresh/nodeWatcherHandlers/threadListHide.handler.ts
+++ b/src/features/autoRefresh/nodeWatcherHandlers/threadListHide.handler.ts
@@ -1,5 +1,5 @@
import CssSelectorNodeWatcherScriptHandler from '../../../common/architecture/scripts/nodeWatcher/handlers/CssSelectorNodeWatcherScriptHandler';
-import { NodeMutation, NodeMutationType } from '../../../common/nodeWatcher/NodeWatcherHandler';
+import { NodeMutationType } from '../../../common/nodeWatcher/NodeWatcherHandler';
import { AutoRefreshNodeWatcherDependencies } from '../scripts/nodeWatcher.script';
/**
@@ -12,7 +12,7 @@
NodeMutationType.RemovedNode,
];
- onMutatedNode(_: NodeMutation) {
+ onMutatedNode() {
this.options.autoRefresh.hideUpdatePrompt();
}
}
diff --git a/src/features/autoRefresh/nodeWatcherHandlers/threadListSetUp.handler.ts b/src/features/autoRefresh/nodeWatcherHandlers/threadListSetUp.handler.ts
index 554be00..4806ed3 100644
--- a/src/features/autoRefresh/nodeWatcherHandlers/threadListSetUp.handler.ts
+++ b/src/features/autoRefresh/nodeWatcherHandlers/threadListSetUp.handler.ts
@@ -1,5 +1,4 @@
import CssSelectorNodeWatcherScriptHandler from '../../../common/architecture/scripts/nodeWatcher/handlers/CssSelectorNodeWatcherScriptHandler';
-import { NodeMutation } from '../../../common/nodeWatcher/NodeWatcherHandler';
import { AutoRefreshNodeWatcherDependencies } from '../scripts/nodeWatcher.script';
/**
@@ -8,7 +7,7 @@
export default class AutoRefreshThreadListSetUpHandler extends CssSelectorNodeWatcherScriptHandler<AutoRefreshNodeWatcherDependencies> {
cssSelector = 'ec-thread-list';
- onMutatedNode(_: NodeMutation) {
+ onMutatedNode() {
this.options.autoRefresh.setUp();
}
}