Fix linting for redux-devtools-core

This commit is contained in:
Zalmoxisus 2019-01-03 17:54:53 +02:00
parent edd397d7db
commit 4b9bcf55e6
2 changed files with 6 additions and 5 deletions

View File

@ -11,6 +11,7 @@
"react/jsx-uses-vars": 2,
"react/react-in-jsx-scope": 2,
"react/jsx-quotes": 0,
"arrow-parens": 0,
"block-scoped-var": 0,
"padded-blocks": 0,
"quotes": [ 1, "single" ],

View File

@ -35,21 +35,21 @@ export function getLocalFilter(config) {
}
function getDevToolsOptions() {
return typeof window !== 'undefined' && window.devToolsOptions || {};
return (typeof window !== 'undefined' && window.devToolsOptions) || {};
}
export function isFiltered(action, localFilter) {
const { type } = action.action || action;
const opts = getDevToolsOptions();
if (
!localFilter && (opts.filter && opts.filter === FilterState.DO_NOT_FILTER) ||
type && typeof type.match !== 'function'
(!localFilter && (opts.filter && opts.filter === FilterState.DO_NOT_FILTER)) ||
(type && typeof type.match !== 'function')
) return false;
const { whitelist, blacklist } = localFilter || opts;
return (
whitelist && !type.match(whitelist) ||
blacklist && type.match(blacklist)
(whitelist && !type.match(whitelist)) ||
(blacklist && type.match(blacklist))
);
}