diff --git a/package.json b/package.json
index a5f04b9e..cc28a626 100755
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "react-cool-starter",
- "version": "2.5.2",
+ "version": "2.5.3",
"description": "A starter boilerplate for an universal web application with the best development experience and best practices.",
"main": "index.js",
"engines": {
@@ -145,11 +145,13 @@
"eslintConfig": {
"parser": "babel-eslint",
"extends": [
+ "plugin:lodash/recommended",
"airbnb",
"prettier",
"prettier/react"
],
"plugins": [
+ "lodash",
"react",
"prettier"
],
@@ -195,6 +197,8 @@
]
}
],
+ "lodash/import-scope": "off",
+ "lodash/prefer-noop": "off",
"prettier/prettier": [
"error",
{
@@ -330,6 +334,7 @@
"eslint-loader": "^2.0.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
+ "eslint-plugin-lodash": "^2.7.0",
"eslint-plugin-prettier": "^2.6.2",
"eslint-plugin-react": "^7.9.1",
"file-loader": "^1.1.11",
diff --git a/src/components/UserList/index.js b/src/components/UserList/index.js
index cd5843c2..0ee275be 100755
--- a/src/components/UserList/index.js
+++ b/src/components/UserList/index.js
@@ -1,6 +1,7 @@
/* @flow */
import React from 'react';
+import _ from 'lodash';
import { Link } from 'react-router-dom';
@@ -12,7 +13,7 @@ export default ({ list }: Props) => (
User List
- {list.map(({ id, name }) => (
+ {_.map(list, ({ id, name }) => (
-
{name}
diff --git a/src/utils/configureStore.js b/src/utils/configureStore.js
index 644154d5..41338129 100755
--- a/src/utils/configureStore.js
+++ b/src/utils/configureStore.js
@@ -16,7 +16,7 @@ export default (history: Object, initialState: Object = {}): Store => {
// Use Redux DevTools Extension in development
const composeEnhancers =
(__DEV__ &&
- typeof window === 'object' &&
+ typeof window !== 'undefined' &&
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ||
compose;
const enhancers = composeEnhancers(
diff --git a/src/utils/renderHtml.js b/src/utils/renderHtml.js
index bf6d1458..6ad7781e 100755
--- a/src/utils/renderHtml.js
+++ b/src/utils/renderHtml.js
@@ -1,3 +1,5 @@
+/* eslint-disable lodash/prefer-lodash-method */
+
import serialize from 'serialize-javascript';
import { minify } from 'html-minifier';
diff --git a/yarn.lock b/yarn.lock
index ff7b3cdb..61732c74 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3771,6 +3771,12 @@ eslint-plugin-jsx-a11y@^6.0.3:
emoji-regex "^6.1.0"
jsx-ast-utils "^2.0.0"
+eslint-plugin-lodash@^2.7.0:
+ version "2.7.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-lodash/-/eslint-plugin-lodash-2.7.0.tgz#66cdc1070b7c9d4b749368b54820886380a14c35"
+ dependencies:
+ lodash "~4.17.0"
+
eslint-plugin-prettier@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.2.tgz#71998c60aedfa2141f7bfcbf9d1c459bf98b4fad"
@@ -6799,7 +6805,7 @@ lodash.uniq@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
-"lodash@>=3.5 <5", lodash@^4.0.0, lodash@^4.13.1, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.7.0, lodash@~4.17.10:
+"lodash@>=3.5 <5", lodash@^4.0.0, lodash@^4.13.1, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.7.0, lodash@~4.17.0, lodash@~4.17.10:
version "4.17.10"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"