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/jsx-uses-vars": 2,
|
||||||
"react/react-in-jsx-scope": 2,
|
"react/react-in-jsx-scope": 2,
|
||||||
"react/jsx-quotes": 0,
|
"react/jsx-quotes": 0,
|
||||||
|
"arrow-parens": 0,
|
||||||
"block-scoped-var": 0,
|
"block-scoped-var": 0,
|
||||||
"padded-blocks": 0,
|
"padded-blocks": 0,
|
||||||
"quotes": [ 1, "single" ],
|
"quotes": [ 1, "single" ],
|
||||||
|
|
|
@ -35,21 +35,21 @@ export function getLocalFilter(config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDevToolsOptions() {
|
function getDevToolsOptions() {
|
||||||
return typeof window !== 'undefined' && window.devToolsOptions || {};
|
return (typeof window !== 'undefined' && window.devToolsOptions) || {};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isFiltered(action, localFilter) {
|
export function isFiltered(action, localFilter) {
|
||||||
const { type } = action.action || action;
|
const { type } = action.action || action;
|
||||||
const opts = getDevToolsOptions();
|
const opts = getDevToolsOptions();
|
||||||
if (
|
if (
|
||||||
!localFilter && (opts.filter && opts.filter === FilterState.DO_NOT_FILTER) ||
|
(!localFilter && (opts.filter && opts.filter === FilterState.DO_NOT_FILTER)) ||
|
||||||
type && typeof type.match !== 'function'
|
(type && typeof type.match !== 'function')
|
||||||
) return false;
|
) return false;
|
||||||
|
|
||||||
const { whitelist, blacklist } = localFilter || opts;
|
const { whitelist, blacklist } = localFilter || opts;
|
||||||
return (
|
return (
|
||||||
whitelist && !type.match(whitelist) ||
|
(whitelist && !type.match(whitelist)) ||
|
||||||
blacklist && type.match(blacklist)
|
(blacklist && type.match(blacklist))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user