eslint (additional rules)

This commit is contained in:
RainLoop Team 2016-06-30 03:02:45 +03:00
parent 77a1d3f3df
commit 8e8a041032
150 changed files with 21911 additions and 23106 deletions

View file

@ -8,14 +8,13 @@ class CookieDriver
/**
* @param {string} key
* @param {*} data
* @return {boolean}
* @returns {boolean}
*/
set(key, data) {
let
result = false,
storageResult = null
;
storageResult = null;
try
{
@ -41,7 +40,7 @@ class CookieDriver
/**
* @param {string} key
* @return {*}
* @returns {*}
*/
get(key) {
@ -51,8 +50,7 @@ class CookieDriver
{
const
storageValue = $.cookie(CLIENT_SIDE_STORAGE_INDEX_NAME),
storageResult = null === storageValue ? null : JSON.parse(storageValue)
;
storageResult = null === storageValue ? null : JSON.parse(storageValue);
result = (storageResult && !isUnd(storageResult[key])) ? storageResult[key] : null;
}
@ -62,7 +60,7 @@ class CookieDriver
}
/**
* @return {boolean}
* @returns {boolean}
*/
static supported() {
return !!(window.navigator && window.navigator.cookieEnabled);

View file

@ -8,14 +8,13 @@ class LocalStorageDriver
/**
* @param {string} key
* @param {*} data
* @return {boolean}
* @returns {boolean}
*/
set(key, data) {
let
result = false,
storageResult = null
;
storageResult = null;
try
{
@ -38,7 +37,7 @@ class LocalStorageDriver
/**
* @param {string} key
* @return {*}
* @returns {*}
*/
get(key) {
@ -48,8 +47,7 @@ class LocalStorageDriver
{
const
storageValue = window.localStorage[CLIENT_SIDE_STORAGE_INDEX_NAME] || null,
storageResult = null === storageValue ? null : JSON.parse(storageValue)
;
storageResult = null === storageValue ? null : JSON.parse(storageValue);
result = (storageResult && !isUnd(storageResult[key])) ? storageResult[key] : null;
}
@ -59,7 +57,7 @@ class LocalStorageDriver
}
/**
* @return {boolean}
* @returns {boolean}
*/
static supported() {
return !!window.localStorage;