mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-01-31 11:51:41 +03:00
Fix linting for redux-devtools-core
This commit is contained in:
parent
edd397d7db
commit
4b9bcf55e6
|
@ -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" ],
|
||||
|
|
|
@ -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))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user