Skip to content
Permalink
Browse files

update react packages

Updates react to latest version & implements small updates to how the hot reloader is configured.
Adds linting rules for React Hooks should we decide to use them in future components.
  • Loading branch information...
jameshadfield committed Apr 17, 2019
1 parent c7a1f29 commit e4e23ca6f7aca22928eced8d496007399121d6ad
Showing with 109 additions and 41 deletions.
  1. +3 −0 .eslintrc
  2. +98 −34 package-lock.json
  3. +4 −3 package.json
  4. +2 −2 src/root.js
  5. +2 −2 src/store/index.js
@@ -1,5 +1,6 @@
---
extends: "airbnb"
plugins: ["react-hooks"]
parser: "babel-eslint"
rules:
camelcase: off # require camel case names
@@ -47,6 +48,8 @@ rules:
quote-props: ["error", "as-needed"]
prefer-const: ["error", {"destructuring": "all"}]
indent: ["error", 2, {"MemberExpression": "off", "SwitchCase": 1}]
react-hooks/rules-of-hooks: "error"
react-hooks/exhaustive-deps: "warn"
parserOptions:
ecmaVersion: 6
sourceType: module

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -78,6 +78,7 @@
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.2.1",
"eslint-plugin-react-hooks": "^1.6.0",
"express": "^4.16.3",
"express-naked-redirect": "^0.1.2",
"express-static-gzip": "^0.2.2",
@@ -96,11 +97,11 @@
"prettyjson": "^1.2.1",
"prop-types": "^15.6.0",
"query-string": "^4.2.3",
"react": "^16.6.0",
"react": "^16.8.6",
"react-addons-css-transition-group": "^15.6.0",
"react-dom": "^16.6.0",
"react-dom": "^16.8.6",
"react-ga": "^2.2.0",
"react-hot-loader": "^4.3.12",
"react-hot-loader": "^4.8.4",
"react-redux": "^5.1.0",
"react-select": "^1.0.0-rc.5",
"react-tweet-embed": "^1.1.0",
@@ -1,6 +1,6 @@
import React, { lazy, Suspense } from 'react';
import { connect } from "react-redux";
import { hot } from 'react-hot-loader';
import { hot } from 'react-hot-loader/root';
import Monitor from "./components/framework/monitor";
import DatasetLoader from "./components/datasetLoader";
import Spinner from "./components/framework/spinner";
@@ -54,4 +54,4 @@ const Root = () => {
);
};

export default hot(module)(Root);
export default hot(Root);
@@ -12,7 +12,7 @@ const configureStore = (initialState) => {
];
const composedEnhancers = compose(
applyMiddleware(...middleware),
window.devToolsExtension ? window.devToolsExtension() : (f) => f
window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() : (f) => f
);
const store = createStore(rootReducer, initialState, composedEnhancers);
if (process.env.NODE_ENV !== 'production' && module.hot) {
@@ -25,4 +25,4 @@ const configureStore = (initialState) => {
return store;
};

export default configureStore;
export default configureStore;

0 comments on commit e4e23ca

Please sign in to comment.
You can’t perform that action at this time.