From b083f2a4fe71ba4514ef98654134a6f76662f832 Mon Sep 17 00:00:00 2001 From: John Rodriguez Date: Sat, 15 Apr 2017 15:18:40 -0400 Subject: [PATCH] fix lint errors --- .../storyshots/stories/__test__/storyshots.test.js | 2 +- .../required_with_context/ComponentWithRef.js | 12 ++++++------ .../ComponentWithRef.stories.js | 13 ++++++------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/packages/storyshots/stories/__test__/storyshots.test.js b/packages/storyshots/stories/__test__/storyshots.test.js index f5d1affb54d4..befcfe49d06c 100644 --- a/packages/storyshots/stories/__test__/storyshots.test.js +++ b/packages/storyshots/stories/__test__/storyshots.test.js @@ -1,6 +1,6 @@ import initStoryshots from '../../src'; -function createNodeMock (element) { +function createNodeMock(element) { if (element.type === 'input') { return { scrollWidth: 123 }; } diff --git a/packages/storyshots/stories/required_with_context/ComponentWithRef.js b/packages/storyshots/stories/required_with_context/ComponentWithRef.js index f5424d50df9a..bb828d02b062 100644 --- a/packages/storyshots/stories/required_with_context/ComponentWithRef.js +++ b/packages/storyshots/stories/required_with_context/ComponentWithRef.js @@ -8,20 +8,20 @@ const inputStyles = { fontSize: 15, padding: '3px 10px', margin: 10, - width: '400px' + width: '400px', }; class ComponentWithRef extends React.Component { - componentDidMount () { - this.props.onLoad('scrollWidth: ' + this.ref.scrollWidth); + componentDidMount() { + this.props.onLoad(`scrollWidth: ${this.ref.scrollWidth}`); } - setRef (ref) { + setRef(ref) { this.ref = ref; } - render () { + render() { return ( this.setRef(r)} style={inputStyles} diff --git a/packages/storyshots/stories/required_with_context/ComponentWithRef.stories.js b/packages/storyshots/stories/required_with_context/ComponentWithRef.stories.js index d1e260fbef83..f4086972aa84 100644 --- a/packages/storyshots/stories/required_with_context/ComponentWithRef.stories.js +++ b/packages/storyshots/stories/required_with_context/ComponentWithRef.stories.js @@ -1,8 +1,7 @@ - import React from 'react'; - import { storiesOf, action } from '@kadira/storybook'; - import ComponentWithRef from './ComponentWithRef'; +import React from 'react'; +import { storiesOf, action } from '@kadira/storybook'; +import ComponentWithRef from './ComponentWithRef'; - storiesOf('Component with ref', module) - .add('on mount', () => ( - - )); +storiesOf('Component with ref', module).add('on mount', () => ( + +));