mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 13:09:21 +03:00
Add more strict rules (eslint)
This commit is contained in:
parent
b43bb17cdb
commit
52e2698cdf
38 changed files with 488 additions and 434 deletions
|
|
@ -1,5 +1,7 @@
|
|||
|
||||
import {window, JSON, $} from 'common';
|
||||
import window from 'window';
|
||||
import $ from '$';
|
||||
import JSON from 'JSON';
|
||||
import {isUnd} from 'Common/Utils';
|
||||
import {CLIENT_SIDE_STORAGE_INDEX_NAME} from 'Common/Consts';
|
||||
|
||||
|
|
@ -21,7 +23,7 @@ class CookieDriver
|
|||
const storageValue = $.cookie(CLIENT_SIDE_STORAGE_INDEX_NAME);
|
||||
storageResult = null === storageValue ? null : JSON.parse(storageValue);
|
||||
}
|
||||
catch (e) {/* eslint-disable-line no-empty */}
|
||||
catch (e) {} // eslint-disable-line no-empty
|
||||
|
||||
(storageResult || (storageResult = {}))[key] = data;
|
||||
|
||||
|
|
@ -33,7 +35,7 @@ class CookieDriver
|
|||
|
||||
result = true;
|
||||
}
|
||||
catch (e) {/* eslint-disable-line no-empty */}
|
||||
catch (e) {} // eslint-disable-line no-empty
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
@ -54,7 +56,7 @@ class CookieDriver
|
|||
|
||||
result = (storageResult && !isUnd(storageResult[key])) ? storageResult[key] : null;
|
||||
}
|
||||
catch (e) {/* eslint-disable-line no-empty */}
|
||||
catch (e) {} // eslint-disable-line no-empty
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
import {window, JSON} from 'common';
|
||||
import window from 'window';
|
||||
import JSON from 'JSON';
|
||||
import {isUnd} from 'Common/Utils';
|
||||
import {CLIENT_SIDE_STORAGE_INDEX_NAME} from 'Common/Consts';
|
||||
|
||||
|
|
@ -21,7 +22,7 @@ class LocalStorageDriver
|
|||
const storageValue = window.localStorage[CLIENT_SIDE_STORAGE_INDEX_NAME] || null;
|
||||
storageResult = null === storageValue ? null : JSON.parse(storageValue);
|
||||
}
|
||||
catch (e) {/* eslint-disable-line no-empty */}
|
||||
catch (e) {} // eslint-disable-line no-empty
|
||||
|
||||
(storageResult || (storageResult = {}))[key] = data;
|
||||
|
||||
|
|
@ -30,7 +31,7 @@ class LocalStorageDriver
|
|||
window.localStorage[CLIENT_SIDE_STORAGE_INDEX_NAME] = JSON.stringify(storageResult);
|
||||
result = true;
|
||||
}
|
||||
catch (e) {/* eslint-disable-line no-empty */}
|
||||
catch (e) {} // eslint-disable-line no-empty
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
@ -51,7 +52,7 @@ class LocalStorageDriver
|
|||
|
||||
result = (storageResult && !isUnd(storageResult[key])) ? storageResult[key] : null;
|
||||
}
|
||||
catch (e) {/* eslint-disable-line no-empty */}
|
||||
catch (e) {} // eslint-disable-line no-empty
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue