Skip to content

Commit

Permalink
Maintenance work (react-boilerplate#2618)
Browse files Browse the repository at this point in the history
Updated all the outdated dependencies.

- I changed the `history` imports following a warning saying our usage was deprecated.
- I also removed `eslint-plugin-compat` (which was a recent addition). In v3, instead of being able to tell the plugin about your polyfills in a concise way (i.e. `fetch, promise`), you now have to specify individual methods so it becomes extremely verbose and I have a feeling it will be confusing to many users.
  • Loading branch information
julienben authored Apr 8, 2019
1 parent 434a12a commit fe1b49c
Show file tree
Hide file tree
Showing 6 changed files with 1,926 additions and 819 deletions.
4 changes: 1 addition & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const prettierOptions = JSON.parse(
module.exports = {
parser: 'babel-eslint',
extends: ['airbnb', 'prettier', 'prettier/react'],
plugins: ['prettier', 'redux-saga', 'react', 'react-hooks', 'jsx-a11y', 'compat'],
plugins: ['prettier', 'redux-saga', 'react', 'react-hooks', 'jsx-a11y'],
env: {
jest: true,
browser: true,
Expand All @@ -24,7 +24,6 @@ module.exports = {
},
rules: {
'prettier/prettier': ['error', prettierOptions],
'compat/compat': 'error',
'arrow-body-style': [2, 'as-needed'],
'class-methods-use-this': 0,
'import/imports-first': 0,
Expand Down Expand Up @@ -86,6 +85,5 @@ module.exports = {
config: './internals/webpack/webpack.prod.babel.js',
},
},
polyfills: ['fetch', 'promises'],
},
};
4 changes: 2 additions & 2 deletions app/components/Header/tests/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { render } from 'react-testing-library';
import { Provider } from 'react-redux';
import { IntlProvider } from 'react-intl';
import { ConnectedRouter } from 'connected-react-router/immutable';
import createHistory from 'history/createMemoryHistory';
import { createMemoryHistory } from 'history';

import Header from '../index';
import configureStore from '../../../configureStore';

describe('<Header />', () => {
const history = createHistory();
const history = createMemoryHistory();
const store = configureStore({}, history);

it('should render a div', () => {
Expand Down
4 changes: 2 additions & 2 deletions app/utils/history.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import createHistory from 'history/createBrowserHistory';
const history = createHistory();
import { createBrowserHistory } from 'history';
const history = createBrowserHistory();
export default history;
4 changes: 2 additions & 2 deletions internals/templates/utils/history.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import createHistory from 'history/createBrowserHistory';
const history = createHistory();
import { createBrowserHistory } from 'history';
const history = createBrowserHistory();
export default history;
Loading

0 comments on commit fe1b49c

Please sign in to comment.