From c328de225a61968a3fd0845cae2d59c5a027247b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Wed, 7 Jun 2017 19:52:11 +0200 Subject: [PATCH] Fixed eslint errors (caused by prettier/prettier plugin) (#400) --- scripts/release.js | 6 ++++-- src/packages/recompose/__tests__/branch-test.js | 4 ++-- .../isReferentiallyTransparentFunctionComponent-test.js | 3 +-- src/packages/recompose/__tests__/toClass-test.js | 3 +-- src/packages/recompose/__tests__/withHandlers-test.js | 4 ++-- src/packages/recompose/createEagerElement.js | 3 +-- src/packages/recompose/createEagerFactory.js | 3 +-- 7 files changed, 12 insertions(+), 14 deletions(-) diff --git a/scripts/release.js b/scripts/release.js index 901b30d9..1acdf121 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -55,8 +55,10 @@ try { ) while ( - !(!nextVersion || - (semver.valid(nextVersion) && semver.gt(nextVersion, version))) + !( + !nextVersion || + (semver.valid(nextVersion) && semver.gt(nextVersion, version)) + ) ) { nextVersion = readline.question( `Must provide a valid version that is greater than ${version}, ` + diff --git a/src/packages/recompose/__tests__/branch-test.js b/src/packages/recompose/__tests__/branch-test.js index 914fa11f..260b8752 100644 --- a/src/packages/recompose/__tests__/branch-test.js +++ b/src/packages/recompose/__tests__/branch-test.js @@ -11,13 +11,13 @@ test('branch tests props and applies one of two HoCs, for true and false', () => withProps({ name: 'Heisenberg' }), withProps({ name: 'Walter' }) ) - )(({ isBad, name, updateIsBad }) => ( + )(({ isBad, name, updateIsBad }) =>
{isBad ? 'true' : 'false'}
{name}
- )) + ) expect(SayMyName.displayName).toBe('withState(branch(Component))') diff --git a/src/packages/recompose/__tests__/isReferentiallyTransparentFunctionComponent-test.js b/src/packages/recompose/__tests__/isReferentiallyTransparentFunctionComponent-test.js index ba062e8f..dfd94b70 100644 --- a/src/packages/recompose/__tests__/isReferentiallyTransparentFunctionComponent-test.js +++ b/src/packages/recompose/__tests__/isReferentiallyTransparentFunctionComponent-test.js @@ -1,8 +1,7 @@ import React, { Component } from 'react' import createReactClass from 'create-react-class' import PropTypes from 'prop-types' -import isReferentiallyTransparentFunctionComponent - from '../isReferentiallyTransparentFunctionComponent' +import isReferentiallyTransparentFunctionComponent from '../isReferentiallyTransparentFunctionComponent' test('isReferentiallyTransparentFunctionComponent returns false for strings', () => { expect(isReferentiallyTransparentFunctionComponent('div')).toBe(false) diff --git a/src/packages/recompose/__tests__/toClass-test.js b/src/packages/recompose/__tests__/toClass-test.js index 502cccd5..4d61c607 100644 --- a/src/packages/recompose/__tests__/toClass-test.js +++ b/src/packages/recompose/__tests__/toClass-test.js @@ -63,9 +63,8 @@ test('toClass passes context and props correctly', () => { withContext({ store: PropTypes.object }, props => ({ store: props.store })) )(Provider) - const StatelessComponent = (props, context) => ( + const StatelessComponent = (props, context) =>
- ) StatelessComponent.contextTypes = { store: PropTypes.object } diff --git a/src/packages/recompose/__tests__/withHandlers-test.js b/src/packages/recompose/__tests__/withHandlers-test.js index d30deb34..1c8ad333 100644 --- a/src/packages/recompose/__tests__/withHandlers-test.js +++ b/src/packages/recompose/__tests__/withHandlers-test.js @@ -17,7 +17,7 @@ test('withHandlers passes handlers to base component', () => { }) ) - const Form = enhanceForm(({ value, onChange, onSubmit }) => ( + const Form = enhanceForm(({ value, onChange, onSubmit }) =>

{value}

- )) + ) const wrapper = mount(
) const input = wrapper.find('input') diff --git a/src/packages/recompose/createEagerElement.js b/src/packages/recompose/createEagerElement.js index 48ed68ce..869c2a52 100644 --- a/src/packages/recompose/createEagerElement.js +++ b/src/packages/recompose/createEagerElement.js @@ -1,6 +1,5 @@ import createEagerElementUtil from './utils/createEagerElementUtil' -import isReferentiallyTransparentFunctionComponent - from './isReferentiallyTransparentFunctionComponent' +import isReferentiallyTransparentFunctionComponent from './isReferentiallyTransparentFunctionComponent' const createEagerElement = (type, props, children) => { const isReferentiallyTransparent = isReferentiallyTransparentFunctionComponent( diff --git a/src/packages/recompose/createEagerFactory.js b/src/packages/recompose/createEagerFactory.js index 9395871e..05559d22 100644 --- a/src/packages/recompose/createEagerFactory.js +++ b/src/packages/recompose/createEagerFactory.js @@ -1,6 +1,5 @@ import createEagerElementUtil from './utils/createEagerElementUtil' -import isReferentiallyTransparentFunctionComponent - from './isReferentiallyTransparentFunctionComponent' +import isReferentiallyTransparentFunctionComponent from './isReferentiallyTransparentFunctionComponent' const createFactory = type => { const isReferentiallyTransparent = isReferentiallyTransparentFunctionComponent(