update code to prevent of eslint escapes
This commit is contained in:
parent
9c613f42ef
commit
2e3b0bb242
|
@ -120,7 +120,6 @@ export default function SearchInput(props: Iprops) {
|
|||
// unwanted side effect: placeholder is not shown on focus/click
|
||||
// https://github.com/JedWatson/react-select/issues/1879
|
||||
// for correct fix AsyncSelect can be extended to support default options reloading on focus/click
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const handleOnFocus = () => {
|
||||
refreshDefaultOptions();
|
||||
};
|
||||
|
|
|
@ -38,8 +38,7 @@ class MLWorkManager {
|
|||
});
|
||||
this.mlSearchEnabled = false;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/unbound-method
|
||||
eventBus.on(Events.LOGOUT, this.logoutHandler, this);
|
||||
eventBus.on(Events.LOGOUT, this.logoutHandler.bind(this), this);
|
||||
this.debouncedLiveSyncIdle = debounce(
|
||||
() => this.onLiveSyncIdle(),
|
||||
LIVE_SYNC_IDLE_DEBOUNCE_SEC * 1000
|
||||
|
@ -58,8 +57,11 @@ class MLWorkManager {
|
|||
logQueueStats(this.liveSyncQueue, 'livesync');
|
||||
this.liveSyncQueue.on('idle', this.debouncedLiveSyncIdle, this);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/unbound-method
|
||||
eventBus.on(Events.FILE_UPLOADED, this.fileUploadedHandler, this);
|
||||
eventBus.on(
|
||||
Events.FILE_UPLOADED,
|
||||
this.fileUploadedHandler.bind(this),
|
||||
this
|
||||
);
|
||||
eventBus.on(
|
||||
Events.LOCAL_FILES_UPDATED,
|
||||
this.debouncedFilesUpdated,
|
||||
|
@ -75,8 +77,7 @@ class MLWorkManager {
|
|||
|
||||
eventBus.removeListener(
|
||||
Events.FILE_UPLOADED,
|
||||
// eslint-disable-next-line @typescript-eslint/unbound-method
|
||||
this.fileUploadedHandler,
|
||||
this.fileUploadedHandler.bind(this),
|
||||
this
|
||||
);
|
||||
eventBus.removeListener(
|
||||
|
@ -85,8 +86,7 @@ class MLWorkManager {
|
|||
this
|
||||
);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/await-thenable
|
||||
await this.stopSyncJob();
|
||||
this.stopSyncJob();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,8 +103,7 @@ class MLWorkManager {
|
|||
private async logoutHandler() {
|
||||
addLogLine('logoutHandler');
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/await-thenable
|
||||
await this.stopSyncJob();
|
||||
this.stopSyncJob();
|
||||
this.mlSyncJob = undefined;
|
||||
await this.terminateLiveSyncWorker();
|
||||
await mlIDbStorage.clearMLDB();
|
||||
|
|
|
@ -72,15 +72,13 @@ class MLIDbStorage {
|
|||
}
|
||||
|
||||
private openDB(): Promise<IDBPDatabase<MLDb>> {
|
||||
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
||||
const mlIDbStorage = this;
|
||||
return openDB<MLDb>(MLDATA_DB_NAME, 3, {
|
||||
async terminated() {
|
||||
terminated: async () => {
|
||||
console.error('ML Indexed DB terminated');
|
||||
logError(new Error(), 'ML Indexed DB terminated');
|
||||
mlIDbStorage._db = undefined;
|
||||
this._db = undefined;
|
||||
// TODO: remove if there is chance of this going into recursion in some case
|
||||
await mlIDbStorage.db;
|
||||
await this.db;
|
||||
},
|
||||
blocked() {
|
||||
// TODO: make sure we dont allow multiple tabs of app
|
||||
|
|
Loading…
Reference in a new issue