From 4b9bcf55e69b50739f16c09a7a3c723d718076aa Mon Sep 17 00:00:00 2001 From: Zalmoxisus Date: Thu, 3 Jan 2019 17:54:53 +0200 Subject: [PATCH] Fix linting for `redux-devtools-core` --- packages/redux-devtools-core/.eslintrc | 1 + packages/redux-devtools-core/src/utils/filters.js | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/redux-devtools-core/.eslintrc b/packages/redux-devtools-core/.eslintrc index 90959cf7..92a77cff 100644 --- a/packages/redux-devtools-core/.eslintrc +++ b/packages/redux-devtools-core/.eslintrc @@ -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" ], diff --git a/packages/redux-devtools-core/src/utils/filters.js b/packages/redux-devtools-core/src/utils/filters.js index 814cc9c7..9f704c69 100644 --- a/packages/redux-devtools-core/src/utils/filters.js +++ b/packages/redux-devtools-core/src/utils/filters.js @@ -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)) ); }