From ad6fdf208b923766967fee51687db4a910c26392 Mon Sep 17 00:00:00 2001 From: John Rodriguez Date: Thu, 18 May 2017 14:33:08 -0400 Subject: [PATCH] fix lint errors --- addons/storyshots/src/index.js | 4 ++-- packages/storyshots/stories/__test__/storyshots.test.js | 7 +++++-- .../stories/required_with_context/ComponentWithRef.js | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/addons/storyshots/src/index.js b/addons/storyshots/src/index.js index 94ca396fd658..3d28b9702b1c 100644 --- a/addons/storyshots/src/index.js +++ b/addons/storyshots/src/index.js @@ -13,8 +13,8 @@ const babel = require('babel-core'); function hasDependency(pkg, dependency) { return (pkg.devDependencies && pkg.devDependencies[dependency]) || - (pkg.dependencies && pkg.dependencies[dependency]) || - (pkg.name === dependency); + (pkg.dependencies && pkg.dependencies[dependency]) || + pkg.name === dependency; } const pkg = readPkgUp.sync().pkg; diff --git a/packages/storyshots/stories/__test__/storyshots.test.js b/packages/storyshots/stories/__test__/storyshots.test.js index 0d050b0822d2..6df135ef033c 100644 --- a/packages/storyshots/stories/__test__/storyshots.test.js +++ b/packages/storyshots/stories/__test__/storyshots.test.js @@ -1,11 +1,14 @@ import initStoryshots from '../../src'; import path from 'path'; -function createNodeMock (element) { +function createNodeMock(element) { if (element.type === 'input') { return { scrollWidth: 123 }; } return null; } -initStoryshots({ rendererOptions: { createNodeMock }, configPath: path.resolve(__dirname, '../../.storybook') }); +initStoryshots({ + rendererOptions: { createNodeMock }, + configPath: path.resolve(__dirname, '../../.storybook'), +}); diff --git a/packages/storyshots/stories/required_with_context/ComponentWithRef.js b/packages/storyshots/stories/required_with_context/ComponentWithRef.js index bb828d02b062..54b7b109c73a 100644 --- a/packages/storyshots/stories/required_with_context/ComponentWithRef.js +++ b/packages/storyshots/stories/required_with_context/ComponentWithRef.js @@ -31,7 +31,7 @@ class ComponentWithRef extends React.Component { } ComponentWithRef.propTypes = { - onLoad: PropTypes.func + onLoad: PropTypes.func, }; export default ComponentWithRef;